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.

referencescomponents.md

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

Components

i18n-t, i18n-n, i18n-d ship with vue-i18n and register globally at app.use time unless globalInstall: false (dist/vue-i18n.d.ts:1810-1822). Programmatic names: Translation (I18nT), NumberFormat (I18nN), DatetimeFormat (I18nD) (dist/vue-i18n.mjs:2529).

Common base props (BaseFormatProps, dist/vue-i18n.d.ts:68-107)

Prop Type Notes
tag string | object Wrapper element; omit for Fragment
locale string Override the scope locale
scope 'global' | 'parent' Which scope to use
i18n Composer Explicit composer; takes precedence over scope

i18n-t (Translation)

Interpolates slot content into placeholders (dist/vue-i18n.d.ts:2031-2043).

Props: keypath: string (required), plural?: number | string.

<i18n-t keypath="term" tag="label" for="tos">
  <a href="/tos" target="_blank">{{ $t('tos') }}</a>
</i18n-t>
{ "term": "I accept {0}." }

Slot names match placeholders: named interpolation {name} uses slot #name, list interpolation {0} uses the default slot. Placeholders without a matching slot render empty.

i18n-n (NumberFormat)

Props: value: number (required), format: string | Intl.NumberFormatOptions, plus BaseFormatProps (dist/vue-i18n.d.ts:1900).

<i18n-n :value="1234.15" format="currency"></i18n-n>

Scoped slot receives formatted parts ({ parts }) for per-part markup (integer, decimal, currency symbol).

i18n-d (DatetimeFormat)

Props: value: number | Date (required), format: string | Intl.DateTimeFormatOptions, plus BaseFormatProps (dist/vue-i18n.d.ts:1497).

<i18n-d :value="new Date()" format="long"></i18n-d>

Scoped slot receives { parts } (literal text vs day/month/year values).

Named format values resolve from the numberFormats / datetimeFormats options passed to createI18n or useI18n.

v-t directive (deprecated)

v-t updates textContent from a keypath (string or { path, locale, args } object). Deprecated in v11, removed in v12 (dist/vue-i18n.d.ts:2024, 2136-2138). Replace with t(), $t, or <i18n-t>. Lint existing usage with @intlify/vue-i18n/no-deprecated-v-t (https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-v-t.html).

Docs: https://vue-i18n.intlify.dev/guide/advanced/component.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