Vue Cli Plugin I18n screenshot

Vue Cli Plugin I18n

Author Avatar Theme by Intlify
Updated: 27 Mar 2023
196 Stars

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

Overview

The vue-cli-plugin-i18n is a powerful plugin designed for developers looking to integrate localization into their Vue projects. By leveraging vue-i18n, this tool allows for streamlined support of multi-language applications, making it easier for developers to manage locale messages effortlessly. It’s particularly ideal for those who appreciate having consistent access to internationalization features without digging deep into configuration files.

With the vue-cli-plugin-i18n, you can get your project scaffolded and set up with basic localization features right out of the box, which can significantly speed up the development workflow. This plugin is especially suited for projects built on Vue 2, but it also provides some features for Vue 3 users, making it a versatile addition to any developer’s toolkit.

Features

  • Basic Scaffolding: Quickly add vue-i18n support to your Vue project with minimal setup required.
  • Single File Components Support: Locales can be embedded in Single File Components, thanks to the vue-i18n-loader, enhancing project organization.
  • Missing & Unused Keys Reporting: An experimental feature that aids in maintaining code quality by reporting missing locale keys and unused keys.
  • Environment Variables: Automatically generates .env variables to manage project localization settings, such as VUE_APP_I18N_LOCALE and VUE_APP_I18N_FALLBACK_LOCALE.
  • Custom Configuration Options: Tailor your setup with options like localeDir, enableInSFC, and enableBridge, which provide flexibility based on project needs.
  • Compatibility with Vue Versions: Works seamlessly with Vue 2 and offers limited support for Vue 3, catering to a wide range of projects.
  • Advanced Compilation Features: In bridge mode, localized messages can be pre-compiled during production builds to optimize performance.
  • Runtime-Only Option: For Vue 3 projects, the plugin offers the choice to use a runtime-only version of Vue I18n, reducing the bundle size.