cn locales to vuetify standard

This commit is contained in:
Alireza Ahmadi
2024-06-15 20:11:39 +02:00
parent f5792c9d82
commit ccbd591b39
4 changed files with 23 additions and 8 deletions
+9 -1
View File
@@ -42,6 +42,7 @@
<script lang="ts">
import DatePicker from 'vue3-persian-datetime-picker'
import { i18n } from '@/locales'
import 'moment/locale/vi'
import 'moment/locale/zh-cn'
import 'moment/locale/zh-tw'
@@ -58,7 +59,14 @@ export default {
computed: {
locale() {
const l = i18n.global.locale.value
return l.replace('zh', 'zh-')
switch (l) {
case "zhHans":
return "zh-cn"
case "zhHant":
return "zh-tw"
default:
return l
}
},
dateFormatted() {
if (this.expDate == 0) return i18n.global.t('unlimited')