feat: Languages with country codes

This commit is contained in:
Maksim Eltyshev
2024-07-21 19:33:57 +02:00
parent 79ad1836a8
commit 07e1903bb5
83 changed files with 211 additions and 99 deletions

View File

@@ -58,9 +58,9 @@ i18n
.use(initReactI18next)
.init({
resources: embeddedLocales,
fallbackLng: 'en',
fallbackLng: 'en-US',
supportedLngs: languages,
load: 'languageOnly',
load: 'currentOnly',
interpolation: {
escapeValue: false,
format(value, format, language) {
@@ -80,7 +80,7 @@ i18n
});
i18n.loadCoreLocale = async (language = i18n.resolvedLanguage) => {
if (language === 'en') {
if (language === i18n.options.fallbackLng[0]) {
return;
}