diff options
-rw-r--r-- | client/src/app/app.module.ts | 4 | ||||
-rw-r--r-- | shared/models/i18n/i18n.ts | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 55e929e78..ef23c9655 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -81,12 +81,12 @@ export function metaFactory (serverService: ServerService): MetaLoader { | |||
81 | { | 81 | { |
82 | provide: TRANSLATIONS, | 82 | provide: TRANSLATIONS, |
83 | useFactory: (locale: string) => { | 83 | useFactory: (locale: string) => { |
84 | // Default locale, nothing to translate | 84 | // Default locale, nothing to translate |
85 | const completeLocale = getCompleteLocale(locale) | 85 | const completeLocale = getCompleteLocale(locale) |
86 | if (isDefaultLocale(completeLocale)) return '' | 86 | if (isDefaultLocale(completeLocale)) return '' |
87 | 87 | ||
88 | const fileLocale = buildFileLocale(locale) | 88 | const fileLocale = buildFileLocale(locale) |
89 | return require(`raw-loader!../locale/angular.${fileLocale}.xlf`) | 89 | return require(`raw-loader!../locale/angular.${fileLocale}.xlf`).default |
90 | }, | 90 | }, |
91 | deps: [ LOCALE_ID ] | 91 | deps: [ LOCALE_ID ] |
92 | }, | 92 | }, |
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 27b911b75..9a5ea27dc 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -33,20 +33,25 @@ const I18N_LOCALE_ALIAS = { | |||
33 | 'ca': 'ca-ES', | 33 | 'ca': 'ca-ES', |
34 | 'cs': 'cs-CZ', | 34 | 'cs': 'cs-CZ', |
35 | 'de': 'de-DE', | 35 | 'de': 'de-DE', |
36 | 'el': 'el-GR', | ||
36 | 'en': 'en-US', | 37 | 'en': 'en-US', |
37 | 'es': 'es-ES', | 38 | 'es': 'es-ES', |
38 | 'eu': 'eu-ES', | 39 | 'eu': 'eu-ES', |
39 | 'fi': 'fi-FI', | 40 | 'fi': 'fi-FI', |
40 | 'fr': 'fr-FR', | 41 | 'fr': 'fr-FR', |
42 | 'ja': 'ja-JP', | ||
43 | 'it': 'it-IT', | ||
41 | 'hu': 'hu-HU', | 44 | 'hu': 'hu-HU', |
42 | 'nl': 'nl-NL', | 45 | 'nl': 'nl-NL', |
43 | 'pl': 'pl-PL', | 46 | 'pl': 'pl-PL', |
44 | 'pt': 'pt-PT', | 47 | 'pt': 'pt-BR', |
45 | 'ru': 'ru-RU', | 48 | 'ru': 'ru-RU', |
46 | 'sv': 'sv-SE', | 49 | 'sv': 'sv-SE', |
47 | 'th': 'th-TH', | 50 | 'th': 'th-TH', |
48 | 'zh': 'zh-Hans-CN', | 51 | 'zh': 'zh-Hans-CN', |
52 | 'zh-Hans': 'zh-Hans-CN', | ||
49 | 'zh-CN': 'zh-Hans-CN', | 53 | 'zh-CN': 'zh-Hans-CN', |
54 | 'zh-Hant': 'zh-Hant-TW', | ||
50 | 'zh-TW': 'zh-Hant-TW' | 55 | 'zh-TW': 'zh-Hant-TW' |
51 | } | 56 | } |
52 | 57 | ||