|
@@ -5,10 +5,20 @@ import ES from "./es";
|
|
|
import IT from "./it";
|
|
|
import TR from "./tr";
|
|
|
import JP from "./jp";
|
|
|
+import DE from "./de";
|
|
|
|
|
|
export type { LocaleType } from "./cn";
|
|
|
|
|
|
-export const AllLangs = ["en", "cn", "tw", "es", "it", "tr", "jp"] as const;
|
|
|
+export const AllLangs = [
|
|
|
+ "en",
|
|
|
+ "cn",
|
|
|
+ "tw",
|
|
|
+ "es",
|
|
|
+ "it",
|
|
|
+ "tr",
|
|
|
+ "jp",
|
|
|
+ "de",
|
|
|
+] as const;
|
|
|
type Lang = (typeof AllLangs)[number];
|
|
|
|
|
|
const LANG_KEY = "lang";
|
|
@@ -56,6 +66,8 @@ export function getLang(): Lang {
|
|
|
return "tr";
|
|
|
} else if (lang.includes("jp")) {
|
|
|
return "jp";
|
|
|
+ } else if (lang.includes("de")) {
|
|
|
+ return "de";
|
|
|
} else {
|
|
|
return "en";
|
|
|
}
|
|
@@ -66,6 +78,13 @@ export function changeLang(lang: Lang) {
|
|
|
location.reload();
|
|
|
}
|
|
|
|
|
|
-export default { en: EN, cn: CN, tw: TW, es: ES, it: IT, tr: TR, jp: JP }[
|
|
|
- getLang()
|
|
|
-];
|
|
|
+export default {
|
|
|
+ en: EN,
|
|
|
+ cn: CN,
|
|
|
+ tw: TW,
|
|
|
+ es: ES,
|
|
|
+ it: IT,
|
|
|
+ tr: TR,
|
|
|
+ jp: JP,
|
|
|
+ de: DE,
|
|
|
+}[getLang()];
|