mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 04:49:08 +01:00
Migrate entrypoint to support new i18n-js version
This commit is contained in:
parent
bee89d367c
commit
a8c1961af3
1 changed files with 12 additions and 0 deletions
12
app/javascript/retrospring/i18n.ts
Normal file
12
app/javascript/retrospring/i18n.ts
Normal 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;
|
Loading…
Reference in a new issue