On-demand referencing element-ui component internationalization (vue-i18n) in vue

version information is "element-ui": "^ 2.3.3", "vue": "^ 2.5.2"

projects need to use element-ui paging component -- Pagination , and need to use multiple languages ( vue-i18n ) to support switching between Chinese and English. According to the official document reference, but keep reporting errors, the error message is as follows:

import messages from "./language"
import VueI18n from "vue-i18n"
import eleLocale from "element-ui/lib/locale";
import enLocale from "element-ui/lib/locale/lang/en"
import zhLocale from "element-ui/lib/locale/lang/zh-CN"

Vue.use(VueI18n)
Vue.use(Pagination)

const i18n = new VueI18n({
  locale: Vue.config.lang || "en",
  messages,
})
eleLocale.i18n((key, value) => i18n.t(key, value)) //element

cn.js file

import zhLocale from "element-ui/lib/locale/lang/zh-CN"
const cn= {
    //
    common: {
        notice: "",
        more: "",
    },
    zhLocale,
}
export default cn;

en.js omitted.

Mar.17,2021

import VueI18n from 'vue-i18n';
import ElementUI from 'element-ui';

Vue.use(VueI18n);
const i18n = new VueI18n({
    locale: Vue.config.lang || 'en',
    messages,
})

Vue.use(ElementUI, {
    i18n: (key, value) => i18n.t(key, value) // Elementi18n
});

eleLocale.i18n((key, value) => i18n.t(key, value))

official documents


  new Vue({
      el: '-sharpapp',
      i18n,
      template: '<App/>',
      components: { App }
  });

I would like to ask how internationalization is configured on the next page. Mine shows el.pagination.total.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e46a4e-44113.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e46a4e-44113.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?