mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat(localization): add support for additional dayjs locales
Expand dayjs locale support by adding Arabic, Russian, Turkish, and Vietnamese locales. Update default locale handling to use English when no specific locale is matched.
This commit is contained in:
parent
59ec9136fa
commit
27b389371d
2 changed files with 20 additions and 4 deletions
|
@ -13,6 +13,10 @@ import 'dayjs/locale/zh-tw'
|
||||||
import 'dayjs/locale/pt'
|
import 'dayjs/locale/pt'
|
||||||
import 'dayjs/locale/es'
|
import 'dayjs/locale/es'
|
||||||
import 'dayjs/locale/it'
|
import 'dayjs/locale/it'
|
||||||
|
import 'dayjs/locale/ar'
|
||||||
|
import 'dayjs/locale/ru'
|
||||||
|
import 'dayjs/locale/tr'
|
||||||
|
import 'dayjs/locale/vi'
|
||||||
|
|
||||||
const settings = useSettingsStore()
|
const settings = useSettingsStore()
|
||||||
|
|
||||||
|
@ -61,8 +65,8 @@ function init() {
|
||||||
case 'de':
|
case 'de':
|
||||||
dayjs.locale('de')
|
dayjs.locale('de')
|
||||||
break
|
break
|
||||||
case 'en':
|
case 'zh_CN':
|
||||||
dayjs.locale('en')
|
dayjs.locale('zh-cn')
|
||||||
break
|
break
|
||||||
case 'zh_TW':
|
case 'zh_TW':
|
||||||
dayjs.locale('zh-tw')
|
dayjs.locale('zh-tw')
|
||||||
|
@ -76,8 +80,20 @@ function init() {
|
||||||
case 'it':
|
case 'it':
|
||||||
dayjs.locale('it')
|
dayjs.locale('it')
|
||||||
break
|
break
|
||||||
|
case 'ar':
|
||||||
|
dayjs.locale('ar')
|
||||||
|
break
|
||||||
|
case 'ru':
|
||||||
|
dayjs.locale('ru')
|
||||||
|
break
|
||||||
|
case 'tr':
|
||||||
|
dayjs.locale('tr')
|
||||||
|
break
|
||||||
|
case 'vi':
|
||||||
|
dayjs.locale('vi')
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
dayjs.locale('zh-cn')
|
dayjs.locale('en')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"version":"2.0.0-rc.2","build_id":1,"total_build":383}
|
{"version":"2.0.0-rc.2","build_id":2,"total_build":384}
|
Loading…
Add table
Add a link
Reference in a new issue