aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/i18n/i18n.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-06 14:23:40 +0200
committerChocobozzz <me@florianbigard.com>2018-06-06 16:48:40 +0200
commite945b184a0f29b47c33bbd05578f3493ca9c8e6c (patch)
tree46c821006d170e6e28658d978e313761adfaf55a /shared/models/i18n/i18n.ts
parent550a562ceca45ea78d6f7054024c8d3a6b89c30c (diff)
downloadPeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.tar.gz
PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.tar.zst
PeerTube-e945b184a0f29b47c33bbd05578f3493ca9c8e6c.zip
Localize player
Diffstat (limited to 'shared/models/i18n/i18n.ts')
-rw-r--r--shared/models/i18n/i18n.ts4
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
10export function isDefaultLocale (locale: string) {
11 return locale === getDefaultLocale()
12}
13
10const possiblePaths = Object.keys(I18N_LOCALES).map(l => '/' + l) 14const possiblePaths = Object.keys(I18N_LOCALES).map(l => '/' + l)
11export function is18nPath (path: string) { 15export function is18nPath (path: string) {
12 return possiblePaths.indexOf(path) !== -1 16 return possiblePaths.indexOf(path) !== -1