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

Ignore certain namespaces #328

Open yanickrochon opened 5 years ago

yanickrochon commented 5 years ago

When some namespaces are loaded directly inside the app, the backend still try to make an HTTP request. This creates unnecessary requests to the server for translations that are already loaded, and do not exist on the server.

A solution would be to pass an array of namespaces to ignore, or refactor parsePayload so if the returned value is false, to skip for the given language.

jamuhl commented 5 years ago

i18next does not load if already in store: https://github.com/i18next/i18next/blob/master/src/BackendConnector.js#L48