1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-31 22:51:28 +01:00
bitwarden-browser/src/services/i18n.service.ts

17 lines
620 B
TypeScript
Raw Normal View History

2018-06-05 21:02:53 +02:00
import { I18nService as BaseI18nService } from 'jslib/services/i18n.service';
export class I18nService extends BaseI18nService {
constructor(systemLanguage: string, localesDirectory: string) {
super(systemLanguage, localesDirectory, async (formattedLocale: string) => {
const filePath = this.localesDirectory + '/' + formattedLocale + '/messages.json';
const localesResult = await fetch(filePath);
const locales = await localesResult.json();
return locales;
});
this.supportedTranslationLocales = [
'en', 'es',
];
}
}