diff --git a/front_end/src/i18n/index.ts b/front_end/src/i18n/index.ts index 54686d00..359ba112 100644 --- a/front_end/src/i18n/index.ts +++ b/front_end/src/i18n/index.ts @@ -22,7 +22,7 @@ function getMessages (): Record { * 获取默认语言 */ function getDefaultLocale () { - return "dev" + return "en" } /** @@ -30,7 +30,12 @@ function getDefaultLocale () { */ export default createI18n({ legacy: false, - fallbackLocale: dev.local, + fallbackLocale: { + 'zh-cn': ['dev'], + 'en': ['dev'], + 'de': ['en'], + 'pl': ['en'], + }, fallbackWarn: false, missingWarn: false, warnHtmlMessage: false, diff --git a/front_end/src/store/index.ts b/front_end/src/store/index.ts index 7f306f08..5c6c0b71 100644 --- a/front_end/src/store/index.ts +++ b/front_end/src/store/index.ts @@ -39,7 +39,7 @@ export const useVideoPlayerStore = defineStore('videoplayer', { export const useLocalStore = defineStore('local', { state: () => ({ darkmode: false, - language: "zh-cn", + language: (navigator.language).toLocaleLowerCase(), language_show: true, menu_font_size: 18, menu_height: 60,