All skills
skilld-dev avatar

/vue-i18n-skilld

@b9c39cb

Use when writing or debugging code that imports vue-i18n (Vue 3 internationalization). Covers createI18n, useI18n, message syntax, i18n-t/i18n-n/i18n-d components, pluralization, datetime and number formatting, TypeScript schemas, lazy loading, bundle optimization, and v10/v11/v12 migration.

Use this Skill: https://skilld.dev/gh/skilld-dev/vue-ecosystem-skills/vue-i18n-skilld

This session only. Nothing lands on disk.

referenceslegacy-api.md

≈425 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Legacy API mode (deprecated)

Legacy API mode reproduces the vue-i18n v8 API on Vue 3 for migration. Deprecated in v11, removed in v12. Do not start new work here; migrate with https://vue-i18n.intlify.dev/guide/migration/vue3.html.

What activates it

createI18n({ legacy: true }) (the default). The I18n.global property then returns a VueI18n instance instead of a Composer (dist/vue-i18n.d.ts:1699), and I18n.mode reports 'legacy' (deprecated, dist/vue-i18n.d.ts:1686-1690).

Surface still present in 11.4.12

The VueI18n interface (dist/vue-i18n.d.ts:2154-2486) mirrors the v8 class: locale, fallbackLocale, t, d, n, te, tm, rt, getLocaleMessage, setLocaleMessage, mergeLocaleMessage, plus pluralizationRules (Legacy name; Composition uses pluralRules).

Component globals: $t, $d, $n, $rt, $te, $tm, $tc (removed), $i18n (the VueI18nInstance union, dist/vue-i18n.d.ts:2557).

Migration moves

  1. Set legacy: false in createI18n.
  2. Keep $t in templates working with globalInjection: true (default) while you convert scripts.
  3. Replace Options API this.$t / this.$i18n with useI18n() in setup.
  4. Replace pluralizationRules with pluralRules.
  5. Drop any allowComposition usage (removed in v10).
  6. Remove v-t directives (also deprecated independently).

Options API note

Options API components (this.$t) imply Legacy mode wiring. Options API without legacy injections: use useI18n() inside a setup() block; the Composition API works in both script styles.

Docs: https://vue-i18n.intlify.dev/guide/advanced/composition.html#legacy-api-mode, API: https://vue-i18n.intlify.dev/api/legacy.html

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The skill is a comprehensive documentation set for the vue-i18n (Vue 3) internationalization library. It provides correct usage guidelines, migration paths, and security advice regarding XSS prevention when handling HTML in translations. No malicious patterns, obfuscation, or unauthorized access attempts were found.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at b9c39cb. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last week

README badge

README badge for skilld-dev/vue-ecosystem-skills/vue-i18n-skilld