forked from linlinjava/litemall
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translation (english + 中文) of the litemall-admin interface (linlinjav…
…a#541) * Add: i18n translations with vue-i18n (english + 中文) * Add: LocaleChanger component on admin login page
- Loading branch information
1 parent
449aae9
commit 47ea5c7
Showing
49 changed files
with
3,033 additions
and
949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- https://kazupon.github.io/vue-i18n/guide/locale.html --> | ||
<template> | ||
<el-select v-model="$i18n.locale" size="mini" placeholder="lang" class="select"> | ||
<el-option v-for="(lang, i) in langs" :key="`Lang${i}`" :label="lang.label" :value="lang.value" /> | ||
</el-select> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'LocaleChanger', | ||
data() { | ||
return { | ||
langs: Object.entries(this.$i18n.messages) | ||
.map(([key, messages]) => ({ | ||
label: messages.lang ?? key, | ||
value: key | ||
})) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
.select { | ||
width: 180px; | ||
} | ||
</style> |
Oops, something went wrong.