Skip to content

Commit

Permalink
Merge pull request eee555#66 from putianyi889/patch-51
Browse files Browse the repository at this point in the history
Set default and fallback language to English
  • Loading branch information
eee555 authored Jul 19, 2024
2 parents 500490c + 4d8b538 commit 1c12230
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions front_end/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ function getMessages (): Record<string, any> {
* 获取默认语言
*/
function getDefaultLocale () {
return "dev"
return "en"
}

/**
* 配置 Vue I18n,开发工具参见:https://vue-i18n.intlify.dev/ecosystem/tools.html
*/
export default createI18n({
legacy: false,
fallbackLocale: dev.local,
fallbackLocale: {
'zh-cn': ['dev'],
'en': ['dev'],
'de': ['en'],
'pl': ['en'],
},
fallbackWarn: false,
missingWarn: false,
warnHtmlMessage: false,
Expand Down
2 changes: 1 addition & 1 deletion front_end/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1c12230

Please sign in to comment.