aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/models/i18n/i18n.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts
index e2b440900..14b02a01d 100644
--- a/shared/models/i18n/i18n.ts
+++ b/shared/models/i18n/i18n.ts
@@ -1,8 +1,8 @@
1export const LOCALE_FILES = [ 'player', 'server' ] 1export const LOCALE_FILES = [ 'player', 'server' ]
2 2
3export const I18N_LOCALES = { 3export const I18N_LOCALES = {
4 'en-US': 'English (US)', 4 'en-US': 'English',
5 'fr-FR': 'Français (France)' 5 'fr-FR': 'Français'
6} 6}
7 7
8const I18N_LOCALE_ALIAS = { 8const I18N_LOCALE_ALIAS = {
@@ -13,8 +13,6 @@ const I18N_LOCALE_ALIAS = {
13export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) 13export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES)
14 .concat(Object.keys(I18N_LOCALE_ALIAS)) 14 .concat(Object.keys(I18N_LOCALE_ALIAS))
15 15
16const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l)
17
18export function getDefaultLocale () { 16export function getDefaultLocale () {
19 return 'en-US' 17 return 'en-US'
20} 18}
@@ -23,6 +21,7 @@ export function isDefaultLocale (locale: string) {
23 return getCompleteLocale(locale) === getCompleteLocale(getDefaultLocale()) 21 return getCompleteLocale(locale) === getCompleteLocale(getDefaultLocale())
24} 22}
25 23
24const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l)
26export function is18nPath (path: string) { 25export function is18nPath (path: string) {
27 return possiblePaths.indexOf(path) !== -1 26 return possiblePaths.indexOf(path) !== -1
28} 27}