aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/language-chooser.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/menu/language-chooser.component.ts')
-rw-r--r--client/src/app/menu/language-chooser.component.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/menu/language-chooser.component.ts b/client/src/app/menu/language-chooser.component.ts
index 9bc934ad4..dd4b35f5e 100644
--- a/client/src/app/menu/language-chooser.component.ts
+++ b/client/src/app/menu/language-chooser.component.ts
@@ -1,5 +1,5 @@
1import { Component, ElementRef, ViewChild, Inject, LOCALE_ID } from '@angular/core' 1import { Component, ElementRef, ViewChild, Inject, LOCALE_ID } from '@angular/core'
2import { I18N_LOCALES } from '../../../../shared' 2import { I18N_LOCALES, getShortLocale } from '../../../../shared'
3import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4import { sortBy } from '@app/shared/misc/utils' 4import { sortBy } from '@app/shared/misc/utils'
5import { getCompleteLocale } from '@shared/models/i18n' 5import { getCompleteLocale } from '@shared/models/i18n'
@@ -13,14 +13,14 @@ import { isOnDevLocale, getDevLocale } from '@app/shared/i18n/i18n-utils'
13export class LanguageChooserComponent { 13export class LanguageChooserComponent {
14 @ViewChild('modal', { static: true }) modal: ElementRef 14 @ViewChild('modal', { static: true }) modal: ElementRef
15 15
16 languages: { id: string, label: string }[] = [] 16 languages: { id: string, label: string, iso: string }[] = []
17 17
18 constructor ( 18 constructor (
19 private modalService: NgbModal, 19 private modalService: NgbModal,
20 @Inject(LOCALE_ID) private localeId: string 20 @Inject(LOCALE_ID) private localeId: string
21 ) { 21 ) {
22 const l = Object.keys(I18N_LOCALES) 22 const l = Object.keys(I18N_LOCALES)
23 .map(k => ({ id: k, label: I18N_LOCALES[k] })) 23 .map(k => ({ id: k, label: I18N_LOCALES[k] , iso: getShortLocale(k)}))
24 24
25 this.languages = sortBy(l, 'label') 25 this.languages = sortBy(l, 'label')
26 } 26 }