diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-06 14:23:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-06 16:48:40 +0200 |
commit | e945b184a0f29b47c33bbd05578f3493ca9c8e6c (patch) | |
tree | 46c821006d170e6e28658d978e313761adfaf55a /shared/models/i18n | |
parent | 550a562ceca45ea78d6f7054024c8d3a6b89c30c (diff) | |
download | PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.tar.gz PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.tar.zst PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.zip |
Localize player
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 |