Migrate entrypoint to support new i18n-js version

This commit is contained in:
Andreas Nedbal 2022-09-17 15:17:07 +02:00
parent bee89d367c
commit a8c1961af3
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import Cookies from 'js-cookie'
import { I18n } from "i18n-js"
import translations from "./i18n.json";
const i18n = new I18n();
i18n.store(translations);
i18n.defaultLocale = "en";
i18n.enableFallback = true;
i18n.locale = Cookies.get('hl') || 'en';
export default i18n;