mirror of
https://github.com/cloudreve/frontend.git
synced 2025-12-25 19:52:48 +00:00
Add ja-JP translation into option list
This commit is contained in:
parent
04e2354ba0
commit
c224da99ce
11
src/i18n.ts
11
src/i18n.ts
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue