diff options
Diffstat (limited to 'shared/models/i18n')
-rw-r--r-- | shared/models/i18n/i18n.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 2d3a1d3e2..4d50bc36e 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -7,6 +7,10 @@ export function getDefaultLocale () { | |||
7 | return 'en-US' | 7 | return 'en-US' |
8 | } | 8 | } |
9 | 9 | ||
10 | export function isDefaultLocale (locale: string) { | ||
11 | return locale === getDefaultLocale() | ||
12 | } | ||
13 | |||
10 | const possiblePaths = Object.keys(I18N_LOCALES).map(l => '/' + l) | 14 | const possiblePaths = Object.keys(I18N_LOCALES).map(l => '/' + l) |
11 | export function is18nPath (path: string) { | 15 | export function is18nPath (path: string) { |
12 | return possiblePaths.indexOf(path) !== -1 | 16 | return possiblePaths.indexOf(path) !== -1 |