Skip to content

Commit eccf682

Browse files
committed
docs: 📝 Update docs locale
1 parent cfba58d commit eccf682

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/pages/about/index.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,18 @@
5353
<script>
5454
import { version } from '/package.json'
5555
import SponsorDialog from './components/SponsorDialog/index.vue'
56+
import { i18n } from '$/locales/index.js'
5657
5758
export default {
5859
name: 'About',
5960
components: {
6061
SponsorDialog,
6162
},
63+
setup() {
64+
return {
65+
locale: i18n.global.locale,
66+
}
67+
},
6268
data() {
6369
return {
6470
loading: false,
@@ -79,7 +85,11 @@ export default {
7985
this.$refs.sponsorDialogRef.open()
8086
},
8187
onClickDocs() {
82-
window.open('https://escrcpy.viarotel.eu.org/')
88+
const locale = {
89+
'zh-CN': 'zhHans',
90+
}[this.locale] || ''
91+
92+
window.open(`https://escrcpy.viarotel.eu.org/${locale}`)
8393
},
8494
handleUpdate() {
8595
this.loading = true

0 commit comments

Comments
 (0)