Vite plugin for Vue2 I18n
$ npm i @zhengchunling/vite-plugin-vue-i18n --save-dev
$ yarn add @zhengchunling/vite-plugin-vue-i18n -D
<i18n>
zh:
title: "标题"
en:
title: "Title"
</i18n>
<i18n src="./locale.yaml">
</i18n>
<i18n lang="json">
{
"zh": {
"title": "标题"
},
"en": {
"title": "Title"
}
}
</i18n>
<i18n src="./locale.json" lang="json">
</i18n>
-
Type:
string | string[] | undefined
-
Default:
undefined
A minimatch pattern, or array of patterns
-
Type:
string | undefined
-
Default:
"yaml"
The extensions of i18n resources supported are as follows:
- json - yaml - yml