1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-26 17:08:33 +01:00

sanitize system language

This commit is contained in:
Kyle Spearrin 2018-04-14 20:17:10 -04:00
parent 2930d7daf7
commit 94ca579168

View File

@ -12,7 +12,9 @@ export class I18nService implements I18nServiceAbstraction {
protected localeMessages: any = {};
constructor(protected systemLanguage: string, protected localesDirectory: string,
protected getLocalesJson: (formattedLocale: string) => Promise<any>) { }
protected getLocalesJson: (formattedLocale: string) => Promise<any>) {
this.systemLanguage = systemLanguage.replace('_', '-');
}
async init(locale?: string) {
if (this.inited) {