1.0.3 • Published 2 years ago

@zhengchunling/vite-plugin-vue-i18n v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vite-plugin-vue-i18n

Vite plugin for Vue2 I18n

Installation

npm

$ npm i @zhengchunling/vite-plugin-vue-i18n --save-dev

yarn

$ yarn add @zhengchunling/vite-plugin-vue-i18n -D

Usage

yaml

<i18n>
zh:
  title: "标题"
en:
  title: "Title"
</i18n>

yaml-import:

<i18n src="./locale.yaml">
</i18n>

json

<i18n lang="json">
{
  "zh": {
    "title": "标题"
  },
  "en": {
    "title": "Title"
  }
}
</i18n>

json-import

<i18n src="./locale.json" lang="json">
</i18n>

Options

exclude

  • Type: string | string[] | undefined

  • Default: undefined

    A minimatch pattern, or array of patterns

defaultLang

  • Type: string | undefined

  • Default: "yaml"

    The extensions of i18n resources supported are as follows:

    - json
    - yaml
    - yml
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago