i18n
All uiv components use en-US
as default language and they are both configurable.
Example
js
import locale from 'uiv/src/locale/lang/zh-CN'
// ...
app.use(uiv, { locale })
You can also create custom wordings if not satisfied with the defaults, simply create your own locale
object and replace with the one in example code.
With vue-i18n
uiv is compatible with vue-i18n as well.
You have to merge uiv language packs into your app's. For example:
javascript
import Vue from 'vue'
import uiv from 'uiv'
// the desire language pack
import locale from 'uiv/src/locale/lang/zh-CN'
import { createApp } from 'vue'
import { createI18n } from 'vue-i18n'
const i18n = createI18n({
// something vue-i18n options here ...
})
const app = createApp({
// something vue options here ...
})
app.use(i18n)
app.use(uiv)
app.mount('#app')
Supported languages
(Sorted by alphabet)
- ar-EG
- bg-BG
- ca-ES
- cs-CZ
- de-DE
- en-US
- es-ES
- fi-FI
- fr-FR
- hu-HU
- it-IT
- ja-JP
- nb-NO
- nl-NL
- pt-BR
- ro-RO
- ru-RU
- sv-SE
- tr-TR
- zh-CN
Welcome to contribute if your target language is not included:
- Add another language config here;
- Create a pull request.