cz correction
MODIFY
src/utils/I18nManager.ts
src/utils/I18nManager.ts
@@ -39,13 +39,13 @@ export default class I18nManager {
public static initialize(): void {
// Get translation files
- i18n.translations['en'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/en.json`, 'utf8'));
- i18n.translations['fr'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/fr.json`, 'utf8'));
- i18n.translations['es'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/es.json`, 'utf8'));
- i18n.translations['de'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/de.json`, 'utf8'));
- i18n.translations['pt'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/pt.json`, 'utf8'));
- i18n.translations['it'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/it.json`, 'utf8'));
- i18n.translations['cz'] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/cz.json`, 'utf8'));
+ Constants.SUPPORTED_LANGUAGES.forEach((lang) => {
+ try {
+ i18n.translations[lang] = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/i18n/${lang}.json`, 'utf8'));
+ } catch (error) {
+ // Do nothing.
+ }
+ });
i18n.fallbacks = Constants.DEFAULT_LANGUAGE;
// Default
i18n.locale = Constants.DEFAULT_LANGUAGE;

cz correction