1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00

localeNames mapped to iso codes

This commit is contained in:
Kyle Spearrin 2019-09-06 09:33:09 -04:00
parent cc614e68d9
commit 255bd3962d
2 changed files with 41 additions and 0 deletions

View File

@ -3,6 +3,7 @@ export abstract class I18nService {
supportedTranslationLocales: string[]; supportedTranslationLocales: string[];
translationLocale: string; translationLocale: string;
collator: Intl.Collator; collator: Intl.Collator;
localeNames: Map<string, string>;
t: (id: string, p1?: string, p2?: string, p3?: string) => string; t: (id: string, p1?: string, p2?: string, p3?: string) => string;
translate: (id: string, p1?: string, p2?: string, p3?: string) => string; translate: (id: string, p1?: string, p2?: string, p3?: string) => string;
} }

View File

@ -6,6 +6,46 @@ export class I18nService implements I18nServiceAbstraction {
supportedTranslationLocales: string[] = ['en']; supportedTranslationLocales: string[] = ['en'];
translationLocale: string; translationLocale: string;
collator: Intl.Collator; collator: Intl.Collator;
localeNames = new Map<string, string>([
['af', 'Afrikaans'],
['bg', 'български'],
['ca', 'català'],
['cs', 'čeština'],
['da', 'dansk'],
['de', 'Deutsch'],
['el', 'Ελληνικά'],
['en', 'English'],
['en-GB', 'English (British)'],
['eo', 'Esperanto'],
['es', 'español'],
['et', 'eesti'],
['fa', 'فارسی'],
['fi', 'suomi'],
['fr', 'français'],
['he', 'עברית'],
['hi', 'हिन्दी'],
['hr', 'hrvatski'],
['hu', 'magyar'],
['id', 'Bahasa Indonesia'],
['it', 'italiano'],
['ja', '日本語'],
['ko', '한국어'],
['nb', 'norsk (bokmål)'],
['nl', 'Nederlands'],
['pl', 'polski'],
['pt-BR', 'português do Brasil'],
['pt-PT', 'português'],
['ro', 'română'],
['ru', 'русский'],
['sk', 'slovenčina'],
['sv', 'svenska'],
['th', 'ไทย'],
['tr', 'Türkçe'],
['uk', 'українська'],
['vi', 'Tiếng Việt'],
['zh-CN', '中文(中国大陆)'],
['zh-TW', '中文(台灣)'],
]);
protected inited: boolean; protected inited: boolean;
protected defaultMessages: any = {}; protected defaultMessages: any = {};