Migrate entrypoint to support new i18n-js version
This commit is contained in:
parent
bee89d367c
commit
a8c1961af3
|
@ -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;
|
Loading…
Reference in New Issue