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: {
escapeValue: false,
},
returnEmptyString: false,
fallbackLng: "en",
lng: getLocales()[0].languageCode ?? "en",
resources,

View File

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