Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(i18n): Fixes retrieving correct countries i18n file.

damencho95943b725c89
diff --git a/react/features/base/i18n/i18next.ts b/react/features/base/i18n/i18next.ts
index ae13902190..8305d9af37 100644
--- a/react/features/base/i18n/i18next.ts
+++ b/react/features/base/i18n/i18next.ts
@@ -65,9 +65,15 @@ export const DEFAULT_LANGUAGE = 'en';
*/
const options: i18next.InitOptions = {
backend: <HttpBackendOptions>{
- loadPath: (lng: string[], ns: string[]) =>
- // eslint-disable-next-line no-extra-parens
- (ns[0] === 'main' ? 'lang/{{ns}}-{{lng}}.json' : 'lang/{{ns}}.json')
+ loadPath: (lng: string[], ns: string[]) => {
+ switch (ns[0]) {
+ case 'countries':
+ case 'main':
+ return 'lang/{{ns}}-{{lng}}.json';
+ default:
+ return 'lang/{{ns}}.json';
+ }
+ }
},
defaultNS: 'main',
fallbackLng: DEFAULT_LANGUAGE,