Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions odd-platform-ui/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export const LANGUAGES_MAP = {
fr: 'French',
ua: 'Ukrainian',
hy: 'Armenian',
br: 'Brazilian Portuguese',
} as const;

export const LANG_TO_COUNTRY_CODE_MAP = {
Expand All @@ -157,6 +158,7 @@ export const LANG_TO_COUNTRY_CODE_MAP = {
fr: 'fr',
ua: 'ua',
hy: 'am',
br: 'br',
} as const;

// regexp
Expand Down
4 changes: 3 additions & 1 deletion odd-platform-ui/src/locales/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ch from './translations/ch.json';
import fr from './translations/fr.json';
import ua from './translations/ua.json';
import hy from './translations/hy.json';
import br from './translations/br.json';

const resources = {
en: { translation: en },
Expand All @@ -14,6 +15,7 @@ const resources = {
fr: { translation: fr },
ua: { translation: ua },
hy: { translation: hy },
br: { translation: br },
};

const languages = Object.keys(resources);
Expand All @@ -27,7 +29,7 @@ const savedLanguage = languages.includes(storedLanguage)
i18n.use(initReactI18next).init({
resources,
lng: savedLanguage,
fallbackLng: ['en', 'es', 'ch', 'fr', 'ua', 'hy'],
fallbackLng: ['en', 'es', 'br', 'ch', 'fr', 'ua', 'hy'],
});

export default i18n;
Loading