mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 15:57:54 +08:00
add new language, Japanese
This commit is contained in:
@@ -4,10 +4,11 @@ import TW from "./tw";
|
||||
import ES from "./es";
|
||||
import IT from "./it";
|
||||
import TR from "./tr";
|
||||
import JP from "./jp";
|
||||
|
||||
export type { LocaleType } from "./cn";
|
||||
|
||||
export const AllLangs = ["en", "cn", "tw", "es", "it", "tr"] as const;
|
||||
export const AllLangs = ["en", "cn", "tw", "es", "it", "tr", "jp"] as const;
|
||||
type Lang = (typeof AllLangs)[number];
|
||||
|
||||
const LANG_KEY = "lang";
|
||||
@@ -53,6 +54,8 @@ export function getLang(): Lang {
|
||||
return "it";
|
||||
} else if (lang.includes("tr")) {
|
||||
return "tr";
|
||||
} else if (lang.includes("jp")) {
|
||||
return "jp";
|
||||
} else {
|
||||
return "en";
|
||||
}
|
||||
@@ -63,4 +66,6 @@ export function changeLang(lang: Lang) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
export default { en: EN, cn: CN, tw: TW, es: ES, it: IT, tr: TR }[getLang()];
|
||||
export default { en: EN, cn: CN, tw: TW, es: ES, it: IT, tr: TR, jp: JP }[
|
||||
getLang()
|
||||
];
|
||||
|
Reference in New Issue
Block a user