|
@@ -37,6 +37,26 @@ webpack.config.js
|
|
|
}
|
|
|
```
|
|
|
|
|
|
+## Compatible with `vue-i18n`
|
|
|
+
|
|
|
+Element is compatible with [vue-i18n](https://github.com/kazupon/vue-i18n), which makes multilingual switching even easier.
|
|
|
+
|
|
|
+```javascript
|
|
|
+import Vue from 'vue'
|
|
|
+import VueI18n from 'vue-i18n'
|
|
|
+import Element from 'element-ui'
|
|
|
+import enLocale from 'element-ui/lib/locale/lang/en'
|
|
|
+import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
|
|
+
|
|
|
+Vue.use(VueI18n)
|
|
|
+Vue.use(Element)
|
|
|
+
|
|
|
+Vue.config.lang = 'zh-cn'
|
|
|
+Vue.locale('zh-cn', zhLocale)
|
|
|
+Vue.locale('en', enLocale)
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
Currently Element ships with the following languages:
|
|
|
<ul class="language-list">
|
|
|
<li>Simplified Chinese (zh-CN)</li>
|