Add support for Japanese language
This commit is contained in:
@@ -3,15 +3,20 @@ import { initReactI18next } from "react-i18next";
|
||||
import { en } from "./lang/en";
|
||||
import { ml } from "./lang/ml";
|
||||
import { zh } from "./lang/zh";
|
||||
import { ja } from "./lang/ja";
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources: {
|
||||
en: en,
|
||||
ml: ml,
|
||||
"zh-CN": zh,
|
||||
zh: zh
|
||||
zh: zh,
|
||||
ja: ja,
|
||||
"ja-JP": ja
|
||||
},
|
||||
fallbackLng: "en",
|
||||
lng: localStorage.getItem("i18nextLng") || "en",
|
||||
|
||||
14
src/i18n/lang/ja.ts
Normal file
14
src/i18n/lang/ja.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import option from "@/assets/locale/ja-JP/option.json";
|
||||
import playground from "@/assets/locale/ja-JP/playground.json";
|
||||
import common from "@/assets/locale/ja-JP/common.json";
|
||||
import sidepanel from "@/assets/locale/ja-JP/sidepanel.json";
|
||||
import settings from "@/assets/locale/ja-JP/settings.json";
|
||||
|
||||
|
||||
export const ja = {
|
||||
option,
|
||||
playground,
|
||||
common,
|
||||
sidepanel,
|
||||
settings
|
||||
}
|
||||
@@ -11,5 +11,9 @@ export const supportLanguage = [
|
||||
{
|
||||
label: "简体中文",
|
||||
value: "zh-CN"
|
||||
},
|
||||
{
|
||||
label: "日本語",
|
||||
value: "ja-JP"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user