Locale payload seems to contain all languages #2082
-
I'm using (images cropped to avoid sensitive data) The Readme clearly states only the language in use should be sent to the client but it doesn't seem to be the case: https://github.com/i18next/next-i18next#5-declaring-locale-dependencies Before I open an issue I'd like to verify that's indeed what's happening here. Is this happening to anyone else? EDIT: /** @type import("next").I18NConfig */
const i18n = {
defaultLocale: "ja",
locales: ["en", "ja"],
localeDetection: true,
};
/** @type import("next-i18next").UserConfig */
const next18nextConfig = {
i18n,
defaultNS: "home",
localePath: path.resolve("./public/locales"),
reloadOnPrerender: isDev, // reloads the page when JSON files change – this needs to be off in production
}; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Seems to work, also the test proofs this: https://github.com/i18next/next-i18next/blob/master/src/serverSideTranslations.test.tsx#L294 |
Beta Was this translation helpful? Give feedback.
Seems to work, also the test proofs this: https://github.com/i18next/next-i18next/blob/master/src/serverSideTranslations.test.tsx#L294
I assume your detected language is en and since your defaultLocale is ja and is always loaded as fallback, en and ja area loaded.