From e945b184a0f29b47c33bbd05578f3493ca9c8e6c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Jun 2018 14:23:40 +0200 Subject: Localize player --- shared/models/i18n/i18n.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shared/models') 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 () { return 'en-US' } +export function isDefaultLocale (locale: string) { + return locale === getDefaultLocale() +} + const possiblePaths = Object.keys(I18N_LOCALES).map(l => '/' + l) export function is18nPath (path: string) { return possiblePaths.indexOf(path) !== -1 -- cgit v1.2.3