i18next / i18next-xhr-backend

[deprecated] can be replaced with i18next-http-backend
https://github.com/i18next/i18next-http-backend
MIT License
253 stars 75 forks source link

Request language dev #334

Closed alirezaseif28 closed 4 years ago

alirezaseif28 commented 4 years ago

hi. I went ahead with the documentation and implemented it according to the following code i18next.use(Backend).init({ backend: { // for all available options read the backend's repository readme file loadPath: '/Scripts/locales/{{lng}}/{{ns}}.json' } });

When I look at server-side requests, I see that these files are in demand.

localhost/Scripts/locales/en/translation.json localhost/Scripts/locales/de/translation.json and localhost/Scripts/locales/dev/translation.json . I wanted to know what this last request is for, do I have to make adjustments?

thank you

jamuhl commented 4 years ago

the last one is from the default set fallbackLng which per default is set to a pseudo language dev (developer english 😁)...

you can set fallbackLng to the main language you like to show if detected language is not supported

https://www.i18next.com/principles/fallback#fallback-language

alirezaseif28 commented 4 years ago

Thank you.