1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-19 20:51:35 +01:00
bitwarden-browser/src/services/i18n.service.ts
Kyle Spearrin f054365a46 cache tag
2018-06-11 09:37:29 -04:00

18 lines
667 B
TypeScript

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?cache=' +
process.env.CACHE_TAG;
const localesResult = await fetch(filePath);
const locales = await localesResult.json();
return locales;
});
this.supportedTranslationLocales = [
'en', 'es',
];
}
}