mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 14:22:25 +08:00
Update: locales in spanish
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import CN from "./cn";
|
||||
import EN from "./en";
|
||||
import TW from "./tw";
|
||||
import ES from "./es";
|
||||
|
||||
export type { LocaleType } from "./cn";
|
||||
|
||||
export const AllLangs = ["en", "cn", "tw"] as const;
|
||||
export const AllLangs = ["en", "cn", "tw", "es"] as const;
|
||||
type Lang = (typeof AllLangs)[number];
|
||||
|
||||
const LANG_KEY = "lang";
|
||||
@@ -44,6 +45,8 @@ export function getLang(): Lang {
|
||||
return "cn";
|
||||
} else if (lang.includes("tw")) {
|
||||
return "tw";
|
||||
} else if (lang.includes("es")) {
|
||||
return "es";
|
||||
} else {
|
||||
return "en";
|
||||
}
|
||||
@@ -54,4 +57,4 @@ export function changeLang(lang: Lang) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
export default { en: EN, cn: CN, tw: TW }[getLang()];
|
||||
export default { en: EN, cn: CN, tw: TW, es: ES }[getLang()];
|
Reference in New Issue
Block a user