intlify / vue-cli-plugin-i18n

:globe_with_meridians: Vue CLI plugin to add vue-i18n to your Vue Project
MIT License
196 stars 41 forks source link
i18n plugin scaffold vue vue-cli vue-i18n

🌏 vue-cli-plugin-i18n

npm npm Test vue-cli-plugin-i18n Dev Token

Vue CLI plugin to add vue-i18n to your Vue Project

🌟 Features

🚀 Getting Started

If yon don't have a project created with Vue CLI:

vue create my-vue-app

Install the plugin into your project:

cd my-vue-app
vue add i18n

🔨 Injected Commands

NOTE: limitation vue-cli-service i18n:report cannot detect missing and unused keys from local messages of i18n custom blocks.

📋 Env variables

When vue-i18n code files had been scaffolded into your project, the following env variables generate into .env:

These env variables are read in src/i18n.(js|ts).

🔧 Configurations

vue-cli-plugin-i18n have some plugin options in vue.config.js:

module.exports = {
  pluginOptions: {
    i18n: {
      locale: 'ja',
      fallbackLocale: 'en',
      localeDir: 'locales',
      enableInSFC: false,
      enableLegacy: false
    }
  }
}

locale

fallbackLocale

localeDir

enableInSFC

enableLegacy

enableBridge

includeLocales

runtimeOnly

compositionOnly

fullInstall

📜 Changelog

Details changes for each release are documented in the CHANGELOG.md.

❗ Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

✅ TODO

Managed with GitHub Projects

đŸ’Ē Contribution

Please make sure to read the Contributing Guide before making a pull request.

Šī¸ License

MIT