When viewing a locale different from the default e.g. german, there is more json than necessary #1881
-
This also happens on the demo site: https://next-i18next.com/de When changing the locale to german (de), I see that the json coming from the next.js server not just includes the german translations but ALSO the english translations why is that? Shouldn't this be optimized to only fetch translations for the currently used locale given by the url? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That is because in both of those cases, English is the default language. The default language is included in addition to the current language, because it is used as a fallback for any missing keys. This behaviour can, of course, be configured via the normal i18next options. |
Beta Was this translation helpful? Give feedback.
That is because in both of those cases, English is the default language. The default language is included in addition to the current language, because it is used as a fallback for any missing keys.
This behaviour can, of course, be configured via the normal i18next options.