[Update] Localization: json to yaml.
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
import yaml from "js-yaml";
|
||||
import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
import translation_en from "./en.json";
|
||||
import translation_ja from "./ja.json";
|
||||
import translation_ko from "./ko.json";
|
||||
import translation_zh_Hant from "./zh-Hant.json";
|
||||
import translation_zh_Hans from "./zh-Hans.json";
|
||||
import en_yml from "./en.yml?raw";
|
||||
import ja_yml from "./ja.yml?raw";
|
||||
import ko_yml from "./ko.yml?raw";
|
||||
import zh_hant_yml from "./zh-Hant.yml?raw";
|
||||
import zh_hans_yml from "./zh-Hans.yml?raw";
|
||||
|
||||
const translation_en = yaml.load(en_yml);
|
||||
const translation_ja = yaml.load(ja_yml);
|
||||
const translation_ko = yaml.load(ko_yml);
|
||||
const translation_zh_Hant = yaml.load(zh_hant_yml);
|
||||
const translation_zh_Hans = yaml.load(zh_hans_yml);
|
||||
|
||||
|
||||
const resources = {
|
||||
@@ -24,9 +31,8 @@ i18n
|
||||
fallbackLng: "en",
|
||||
debug: true,
|
||||
interpolation: {
|
||||
escapeValue: false // react already safes from xss
|
||||
},
|
||||
// react: { useSuspense: false },
|
||||
});
|
||||
escapeValue: false, // react already safes from xss
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
|
||||
Reference in New Issue
Block a user