-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to load path from API to get translation content #117
Comments
Make sure maskedDirectoryPath starts with http... |
@adrai actually no, it's pointing to my local project path. Any chance u spotted something configured wrongly? |
If it does not start with http, pn server side that will fail... |
@adrai I have created a repo here for reproduce purpose. Hope to hear from you soon! |
So can this issue be closed? |
Yes. Thank you for your prompt response! May I understand why must the url leave it with |
it gets automatically interpolated with the requested language and namespace by the used backend plugin |
🐛 Bug Report
I'm trying to get my translation content from a API, the payload response structure is designed as below. (It's not necessarily to follow such structure, as I'm currently concept proofing the reading from API is possible)
en -> language
ns1 -> namespace
anything inside namespace is just key:value translation
I'm however getting the following error message while visiting the page itself (loading the page itself has no issue, everything render fine)
At the same time, I have created 2 .json file within FE project, at path of
projectRootDir/public/locales/en/
Inside both this file, I have also placed the key:value for
welcome
common.json
ns1.json
To Reproduce
next-i18next.config.js
_app.js
FE code
Expected behavior
I'm expecting that the translation content read from API will be returned as the namespace
ns1
.Your Environment
More information on the debug
The text was updated successfully, but these errors were encountered: