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