MCPInstall

vue-i18n-skilld

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.

Installs
403
Last 24h
+9
Trending rank
#9335
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/skilld-dev/vue-ecosystem-skills --skill vue-i18n-skilld
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads vue-i18n-skilld automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

vue-i18n 11.4.12 (Vue 3)

Internationalization plugin for Vue.js.

Core rules

  1. Default to Composition API mode. Pass legacy: false to createI18n and use useI18n(). Legacy API mode (legacy: true, the default) is deprecated in v11 and removed in v12 (dist/vue-i18n.d.ts:1728).
  2. Do not use the v-t directive in new code. Deprecated in v11, removed in v12 (dist/vue-i18n.d.ts:2138). Use t(), $t, or the <i18n-t> component.
  3. tc and $tc no longer exist. Dropped in v11; t/$t handle pluralization via the plural option (verified: no tc export in dist/vue-i18n.d.ts).
  4. Interpolation uses {name} syntax. The v8 modulo % syntax was dropped in v10 (https://vue-i18n.intlify.dev/guide/migration/breaking10.html#drop-modulo-syntax).
  5. 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).
  6. Never interpolate user input into messages rendered with v-html without escapeParameter: true; translate content, do not concatenate HTML.

Setup

// i18n.js
import { createI18n } from 'vue-i18n'

const i18n = createI18n({
  legacy: false, // Composition API mode
  locale: 'ja',
  fallbackLocale: 'en',
  messages: {
    en: { message: { hello: 'hello world' } },
    ja: { message: { hello: 'こんにちは、世界' } }
  }
})

export default i18n
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import i18n from './i18n'

createApp(App).use(i18n).mount('#app')

app.use(i18n) installs the $t/$d/$n/$rt global properties (when globalInjection: true, the default), enables useI18n, and globally registers i18n-t, i18n-d, i18n-n (when globalInstall: true, the default; dist/vue-i18n.d.ts:1810-1822).

Translate in a component

<script setup>
import { useI18n } from 'vue-i18n'
const { t, locale } = useI18n()
</script>

<template>
  <h1>{{ t('message.hello') }}</h1>
  <p>{{ t('greeting', { name: 'Kyoko' }) }}</p>
  <p>{{ $t('message.hello') }}</p><!-- works in templates via globalInjection -->
</template>

Call useI18n() inside setup only. It throws "Must be called at the top of a setup function" otherwise.

Common tasks

Pluralize. Message: 'no apples | one apple | {count} apples' (pipe-separated forms, selected by plural rules for the locale).

t('apple', count, { count }) // or t('apple', { count }, choice)

Custom rules: pluralRules on Composer options (Composition), pluralizationRules (Legacy).

Format dates and numbers.

const { d, n } = useI18n()
d(new Date(), 'long') // named format from datetimeFormats option, else Intl fallback
n(1234567, 'currency') // named format from numberFormats option

Interpolate components. Use <i18n-t keypath="..." tag="p"> with slot children per placeholder; see components.

Switch locale. locale.value = 'en' from a Composer; also update the document lang attribute and, on SSR, the Accept-Language handling (https://vue-i18n.intlify.dev/guide/advanced/lazy.html).

Lazy load locales. Dynamic import() plus setLocaleMessage / mergeLocaleMessage; see optimization.

Type-safe keys

Augment the global DefineLocaleMessage, DefineDateTimeFormat, DefineNumberFormat interfaces to get key completion and inference in useI18n without generics; see typescript.

Pitfalls

  • useI18n({ messages: ... }) creates a local scope; without useScope: 'global' local messages do not merge with global ones (https://vue-i18n.intlify.dev/guide/essentials/scope.html).
  • $t in templates requires globalInjection: true in Composition mode (dist/vue-i18n.d.ts:1735-1746).
  • Vue warns about a missing locale message with key fallback to the key itself; configure missing/missingWarn/fallbackWarn to control noise.
  • Linked messages (@:key), literal { }, and @ | in messages need escaping; see message-syntax.
  • Do not import from deep paths such as vue-i18n/dist/* in bundler projects; use the package root so the correct build resolves (package.json:63-83).

Migration status

ChangeVersionAction
Legacy API mode deprecatedv11Move to legacy: false before v12 (dist/vue-i18n.d.ts:1728)
v-t directive deprecatedv11Replace with t()/$t/<i18n-t> (dist/vue-i18n.d.ts:2138)
tc/$tc removedv11Use t/$t plural option
JIT message compilation defaultv10Pre-compile for strict CSP
% named interpolation removedv10Use {name}
$t positional overload changedv10Pass plural via options object

Details: migration.

References

  • composition-api: createI18n, useI18n, Composer members, scopes, locale switching
  • message-syntax: interpolation, pluralization, linked messages, HTML safety
  • components: i18n-t, i18n-n, i18n-d
  • formats: datetime and number formatting, custom format definitions
  • typescript: schema typing, generated locale types
  • optimization: tree shaking flags, pre-compilation, lazy loading, dist files
  • migration: v9, v10, v11 breaking changes and v12 removals
  • legacy-api: Legacy API mode surface still present in v11

Official documentation: https://vue-i18n.intlify.dev/ API reference: https://vue-i18n.intlify.dev/api/general.html Changelog (cited, not copied): https://github.com/intlify/vue-i18n/blob/master/CHANGELOG.md

FAQ

What does the vue-i18n-skilld skill do?

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.

How do I install vue-i18n-skilld?

Run npx skills add https://github.com/skilld-dev/vue-ecosystem-skills --skill vue-i18n-skilld in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/vue-i18n-skilld/ (personal) or .claude/skills/vue-i18n-skilld/ (project).

Which AI agents can use vue-i18n-skilld?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is vue-i18n-skilld safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains vue-i18n-skilld?

It is published by skilld-dev in skilld-dev/vue-ecosystem-skills. It has 403 recorded installs.

More from skilld-dev/vue-ecosystem-skills

View all →

quasar-skilld

skilld-dev/vue-ecosystem-skills

Build, configure, and debug apps with the Quasar framework (quasar npm package, v2.33.1). Use when writing, reviewing, or debugging code that imports "quasar" or "quasar/wrappers", configuring Quasar with Vite, Vitest, Storybook, UMD, or Quasar CLI, styling with Quasar Sass variables, or upgrading between Quasar v2 releases.

Frontend & Design661 installs

vue-skilld

skilld-dev/vue-ecosystem-skills

Build, debug, and modernize UI with Vue 3.6. Use when editing .vue files, writing components or composables, or working with code that imports "vue". Covers script setup, reactivity, Vapor Mode, SSR, and version-specific API changes from 3.4 through 3.6.0-beta.17.

Frontend & Design399 installs

vuetify-skilld

skilld-dev/vue-ecosystem-skills

Vue Material Component Framework. Use when writing, debugging, or configuring code that imports vuetify v4.x. Covers createVuetify setup, components and labs, composables, theming, icons, dates and locale, styles and SASS variables, treeshaking, and v3 to v4 migration.

Frontend & Design380 installs

pinia-skilld

skilld-dev/vue-ecosystem-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design313 installs

vue-router-skilld

skilld-dev/vue-ecosystem-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design285 installs

pinia-colada-skilld

skilld-dev/vue-ecosystem-skills

Data fetching layer for Vue built on Pinia. Use when writing, debugging, or reviewing code that imports @pinia/colada (pinia colada), including useQuery, useMutation, useInfiniteQuery, defineQuery, query cache invalidation, optimistic updates, plugins, SSR, or migrating from older versions. Provides current 1.4.x APIs, patterns, and migration rules.

Frontend & Design238 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs