多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## i18n 安装 ``` yarn add vue-i18n ``` /src/plugins/i18n.ts ``` import zh from "../i18n/zh" import en from "../i18n/en" export default createI18n({ legacy: false, locale: 'zh', fallbackLocale: 'en', messages:{ zh, en, }, }) ``` 注册: src/plugins/index.ts ``` import i18n from "./i18n" export function registerPlugins (app: App) { app .use(i18n) } ``` 使用 ``` <p>{{ $t("message.hello") }}</p> ```