Skip to content

Commit

Permalink
fix: Set the default language to en
Browse files Browse the repository at this point in the history
  • Loading branch information
BaiJiangJie committed Nov 12, 2024
1 parent 0ed02ca commit 9cbe5e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/layout/components/NavHeader/Language.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export default {
}
},
changeMomentLang() {
if (this.currentLang.code.indexOf('en') > -1) {
this.$moment.locale('en')
} else if (this.currentLang.code.indexOf('ja') > -1) {
if (this.currentLang.code.indexOf('ja') > -1) {
this.$moment.locale('ja')
} else if (this.currentLang.code.indexOf('zh_hant') > -1) {
this.$moment.locale('zh-tw')
} else {
} else if (['zh', 'zh-cn'].includes(this.currentLang.code.toLowerCase())) {
this.$moment.locale('zh-cn')
} else {
this.$moment.locale('en')
}
},
changeLangTo(item) {
Expand Down

0 comments on commit 9cbe5e0

Please sign in to comment.