From c224da99ce73e38739d11307fb51ee58045cab7b Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Tue, 13 May 2025 15:00:53 +0800 Subject: [PATCH] Add ja-JP translation into option list --- src/i18n.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/i18n.ts b/src/i18n.ts index 887ec09..2d95b5c 100644 --- a/src/i18n.ts +++ b/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;