Skip to content

Commit

Permalink
vue3
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Nov 13, 2021
1 parent 56bb78f commit 7bf2203
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/usage/i18n.md
Expand Up @@ -4,6 +4,22 @@ All uiv components use `en-US` as default language and they are both configurabl

## 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](https://vue-i18n.intlify.dev/) as well.

You have to merge uiv language packs into your app's. For example:

```javascript
import Vue from 'vue'
import uiv from 'uiv'
Expand All @@ -27,22 +43,6 @@ app.use(uiv)
app.mount('#app')
```

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](https://github.com/kazupon/vue-i18n) as well.

You have to merge uiv language packs into your app's. For example:

```javascript
import uivLocale from 'uiv/src/locale/lang/zh-CN'

let appLocale = Object.assign({}, uivLocale, {
// ...
})
```

## Supported languages

(Sorted by alphabet)
Expand Down

0 comments on commit 7bf2203

Please sign in to comment.