Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
show locale name for language selection
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Sep 6, 2019
1 parent 2dc74b2 commit 85cc286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jslib
6 changes: 5 additions & 1 deletion src/app/settings/options.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export class OptionsComponent implements OnInit {

const localeOptions: any[] = [];
i18nService.supportedTranslationLocales.forEach((locale) => {
localeOptions.push({ name: locale, value: locale });
let name = locale;
if (i18nService.localeNames.has(locale)) {
name += (' - ' + i18nService.localeNames.get(locale));
}
localeOptions.push({ name: name, value: locale });
});
localeOptions.sort(Utils.getSortFunction(i18nService, 'name'));
localeOptions.splice(0, 0, { name: i18nService.t('default'), value: null });
Expand Down

0 comments on commit 85cc286

Please sign in to comment.