I18n
This project is a collection of internationalized i18n solutions. Implemented via vue-i18n.
Since the project's ui framework uses element, internationalization also needs to be internationalized.
code.
At the same time, the current lang language save in the cookie, and the last language setting can be remembered for opening the page next time.
Global lang
Code: @/lang Currently set English and Chinese languages.
Meanwhile, import a language package in @/lang/index.js for element-ui.
Async lang
There are some langs that are needed for specific pages, such as the @/views/i18n page, you can use async lang.
import local from "./local";
this.$i18n.mergeLocaleMessage("en", local.en);
this.$i18n.mergeLocaleMessage("zh", local.zh);
Remove i18n
In src/main.js remove import i18n from './lang' and delete src/lang folder.
And remove this.$t('route.xxxx') in src/layout/components/Levelbarãsrc/layout/components/SidebarItemãsrc/layout/components/TabsView or others.