Disable returnEmptyString

This commit is contained in:
Zoe Roux 2024-05-23 13:45:28 +02:00
parent 27b0c753bb
commit f005f2022c
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -72,6 +72,7 @@ i18next.use(initReactI18next).init({
interpolation: { interpolation: {
escapeValue: false, escapeValue: false,
}, },
returnEmptyString: false,
fallbackLng: "en", fallbackLng: "en",
lng: getLocales()[0].languageCode ?? "en", lng: getLocales()[0].languageCode ?? "en",
resources, resources,

View File

@ -34,6 +34,8 @@ export const withTranslations = (
interpolation: { interpolation: {
escapeValue: false, escapeValue: false,
}, },
returnEmptyString: false,
fallbackLng: "en",
resources, resources,
}; };
@ -43,7 +45,6 @@ export const withTranslations = (
i18next.init({ i18next.init({
...commonOptions, ...commonOptions,
lng: props.pageProps.__lang, lng: props.pageProps.__lang,
fallbackLng: "en",
}); });
return i18next; return i18next;
}, [props.pageProps.__lang]); }, [props.pageProps.__lang]);
@ -60,7 +61,6 @@ export const withTranslations = (
await i18n.init({ await i18n.init({
...commonOptions, ...commonOptions,
lng, lng,
fallbackLng: "en",
}); });
props.pageProps.__lang = lng; props.pageProps.__lang = lng;
return props; return props;