mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-04 04:23:16 +00:00
chore: add ja locale
This commit is contained in:
@ -24,6 +24,10 @@ const PreferenceSection: React.FC = () => {
|
||||
value: UserSetting_Locale.LOCALE_FR,
|
||||
label: "Français",
|
||||
},
|
||||
{
|
||||
value: UserSetting_Locale.LOCALE_JA,
|
||||
label: "日本語",
|
||||
},
|
||||
];
|
||||
|
||||
const colorThemeOptions = [
|
||||
|
@ -2,6 +2,7 @@ import i18n from "i18next";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import en from "../../locales/en.json";
|
||||
import fr from "../../locales/fr.json";
|
||||
import ja from "../../locales/ja.json";
|
||||
import zh from "../../locales/zh.json";
|
||||
|
||||
i18n.use(initReactI18next).init({
|
||||
@ -15,6 +16,9 @@ i18n.use(initReactI18next).init({
|
||||
fr: {
|
||||
translation: fr,
|
||||
},
|
||||
ja: {
|
||||
translation: ja,
|
||||
},
|
||||
},
|
||||
lng: "en",
|
||||
fallbackLng: "en",
|
||||
|
@ -39,6 +39,8 @@ const Root: React.FC = () => {
|
||||
i18n.changeLanguage("zh");
|
||||
} else if (isEqual(currentUserSetting.locale, UserSetting_Locale.LOCALE_FR)) {
|
||||
i18n.changeLanguage("fr");
|
||||
} else if (isEqual(currentUserSetting.locale, UserSetting_Locale.LOCALE_JA)) {
|
||||
i18n.changeLanguage("ja");
|
||||
} else {
|
||||
i18n.changeLanguage("en");
|
||||
}
|
||||
|
Reference in New Issue
Block a user