Skip to content
🌐 Vue CLI 3 plugin to add vue-i18n to your Vue Project
JavaScript Vue TypeScript HTML
Branch: dev
Clone or download
dependabot-preview and kazupon build(deps): [security] bump lodash.template from 4.4.0 to 4.5.0 (#52)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.4.0...4.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Latest commit 52949a1 Jul 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci 🔧 config(circleci): add circile ci config Feb 22, 2019
.github 📝 docs(.github): update Jun 15, 2019
assets ⭐️ new: localization editor Jun 15, 2018
client-addon-dist 🐛 bug(addon): fix initialization on ui (#41) by @orblazer May 1, 2019
client-addon 🌐 i18n: locale localization with crowdin (#45) May 9, 2019
generator ⭐️ new(command): i18n reporting command (experimental) Apr 9, 2019
tests test: fix ci errors May 5, 2019
ui-public ⭐️ new: localization editor Jun 15, 2018
.editorconfig 🐣 release: commit first Mar 2, 2018
.eslintignore ⭐️ new: localization editor Jun 15, 2018
.eslintrc.js 🔧 config(eslint): add rule Feb 22, 2019
.gitignore Revert " test: fix ci snapshot test errors" May 5, 2019
.mergify.yml 🔧 config: add mergify configration Jul 12, 2019
.npmignore Revert " test: fix ci snapshot test errors" May 5, 2019
CHANGELOG.md 🎉 release(minior): v0.6.0 Apr 9, 2019
LICENSE 🐣 release: commit first Mar 2, 2018
README.md ⭐️ new(command): i18n reporting command (experimental) Apr 9, 2019
crowdin.yml Update Crowdin configuration file May 4, 2019
i18n.js ⭐️ new: localization Jul 21, 2018
index.js ⭐️ new(command): i18n reporting command (experimental) Apr 9, 2019
logo.png 👄 docs(assets): assets for logo May 14, 2018
package.json 🎉 release(minior): v0.6.0 Apr 9, 2019
prompts.js 💥 breaking(config): plugin options namespaced Jun 27, 2018
report.js ⭐️ new(command): i18n reporting command (experimental) Apr 9, 2019
ui.js 🌐 i18n: i18n report task May 4, 2019
utils.js ⭐️ new: locale configration Jul 23, 2018
yarn.lock build(deps): [security] bump lodash.template from 4.4.0 to 4.5.0 (#52) Jul 12, 2019

README.md

🌐 vue-cli-plugin-i18n

npm CircleCI vue-cli-plugin-i18n Dev Token

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

Become a Patreon

⭐️ Features

  • vue-i18n basic scaffolding
  • Locale messages in Single File components with vue-i18n-loader
  • Locale messages missing & unused reporting (experimental)
  • Env Variables

🚀 Getting Started

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

vue create my-vue-app

Install the plugin into your project:

cd my-vue-app
vue add i18n

🔨 Injected Commands

  • vue-cli-service i18n:report (experimental)

    Report the missing locale message keys and unused keys.

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:

  • VUE_APP_I18N_LOCALE

    The locale of project localization, default en.

  • VUE_APP_I18N_FALLBACK_LOCALE

    The locale of project fallback localization, default en.

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

🔧 Configrations

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

module.exports = {
  pluginOptions: {
    i18n: {
      locale: 'ja',             // The locale of project localization
      fallbackLocale: 'en',     // The fallback locale of project localization
      localeDir: 'locales',     // The directory where store localization messages of project
      enableInSFC: false        // Enable locale messages in Single file components
    }
  }
}

See the prompts.js.

📜 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

You can’t perform that action at this time.