Add ja-JP translation into option list

This commit is contained in:
Aaron Liu 2025-05-13 15:00:53 +08:00
parent 04e2354ba0
commit c224da99ce

View File

@ -4,8 +4,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "i18next-http-backend";
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
import ChainedBackend from "i18next-chained-backend";
import LanguageDetector from "i18next-browser-languagedetector";
import ChainedBackend from "i18next-chained-backend";
import LocalStorageBackend from "i18next-localstorage-backend";
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
@ -24,10 +24,7 @@ i18n
escapeValue: false,
},
backend: {
backends:
process.env.NODE_ENV === "development"
? [Backend]
: [LocalStorageBackend, Backend],
backends: process.env.NODE_ENV === "development" ? [Backend] : [LocalStorageBackend, Backend],
backendOptions: [
{
expirationTime: 7 * 24 * 60 * 60 * 1000, // 7 days
@ -54,6 +51,10 @@ export const languages = [
code: "zh-TW",
displayName: "繁體中文",
},
{
code: "ja-JP",
displayName: "日本語",
},
];
export default i18n;