vue-i18n-skilld
Installation
SKILL.md
vue-i18n 11.4.12 (Vue 3)
Internationalization plugin for Vue.js.
- Peer dependency:
vue^3.0.0(package.json:44). No Vue 2 support; use vue-i18n v8 for Vue 2. - Node engines:
>= 22(package.json:47). - For Nuxt 3, use
@nuxtjs/i18ninstead of installing this directly (https://vue-i18n.intlify.dev/guide/integrations/nuxt3.html).
Core rules
- Default to Composition API mode. Pass
legacy: falsetocreateI18nand useuseI18n(). Legacy API mode (legacy: true, the default) is deprecated in v11 and removed in v12 (dist/vue-i18n.d.ts:1728). - Do not use the
v-tdirective in new code. Deprecated in v11, removed in v12 (dist/vue-i18n.d.ts:2138). Uset(),$t, or the<i18n-t>component. tcand$tcno longer exist. Dropped in v11;t/$thandle pluralization via the plural option (verified: notcexport in dist/vue-i18n.d.ts).- Interpolation uses
{name}syntax. The v8 modulo%syntax was dropped in v10 (https://vue-i18n.intlify.dev/guide/migration/breaking10.html#drop-modulo-syntax). - Messages are compiled at runtime (JIT) by default since v10. For CSP-strict environments or best performance, pre-compile with
@intlify/unplugin-vue-i18n(https://vue-i18n.intlify.dev/guide/advanced/optimization.html). - Never interpolate user input into messages rendered with
v-htmlwithoutescapeParameter: true; translate content, do not concatenate HTML.