Element UI Pagination in Chinese instead of English

Daniel picture Daniel · Nov 19, 2017 · Viewed 9.1k times · Source

I started using the very nice Element UI components, and when I try to add the pagination component in my project using

<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400">
</el-pagination>

the text appears in chineese like this: Element UI Pagination component in chineese instead of english

It also happens on their JSFiddle sample, but it's not happening on their website.

Do you know how can I use it in english?

Answer

user3067533 picture user3067533 · Nov 17, 2018
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en'
import App from './App.vue'

Vue.use(ElementUI, { locale })

new Vue({
  el: '#app',
  render: h => h(App)
})

http://element.eleme.io/#/en-US/component/i18n