vue-i18n-skilld
Manage translations and i18n configurations in Vue applications using vue-i18n.
Install
mkdir -p .claude/skills/vue-i18n-skilld && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17112" && unzip -o skill.zip -d .claude/skills/vue-i18n-skilld && rm skill.zipInstalls to .claude/skills/vue-i18n-skilld
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Internationalization plugin for Vue.js. ALWAYS use when writing code importing \"vue-i18n\". Consult for debugging, best practices, or modifying vue-i18n, vue i18n.Key capabilities
- →Manage language resources in Vue.js projects
- →Handle breaking API changes in vue-i18n
- →Utilize current vue-i18n features for internationalization
- →Prefer Composition API mode for new projects
- →Define global resource schemas for TypeScript inference
- →Implement lazy loading for locale messages
How it works
This skill provides guidance on API changes and best practices for the vue-i18n library, ensuring proper internationalization implementation and debugging.
Inputs & outputs
When to use vue-i18n-skilld
- →Configure vue-i18n in a Vue project
- →Debug translation loading issues
- →Migrate from legacy i18n API to Composition API
About this skill
intlify/vue-i18n [email protected]
Tags: rc: 9.0.0-rc.9, alpha: 9.2.0-alpha.9, legacy: 8.28.2
References: Docs
API Changes
This section documents version-specific API changes — prioritize recent major/minor releases.
-
DEPRECATED: Legacy API mode — deprecated in v11 for Composition API preference; scheduled for removal in v12 source
-
DEPRECATED: Custom Directive
v-t— deprecated in v11 due to limited optimization benefits in Vue 3; scheduled for removal in v12 source -
BREAKING:
tcand$tc— dropped in v11 for Legacy API mode; use pluralization support intand$tinstead source -
NEW: Vue 3 Vapor Mode — added compatibility for Vue 3 vapor mode in v11.2.0 source
-
BREAKING: JIT Compilation — enabled by default in v10 to solve CSP issues and support dynamic resources source
-
BREAKING:
$tandtSignatures — Legacy API mode signatures changed in v10 to match Composition API mode; positional locale args now require options object source -
NEW: Generated Locale Types — v10 adds support for extending locale types via
GeneratedTypeConfigfor better TypeScript inference source -
BREAKING: Modulo
%Syntax — named interpolation using modulo syntax dropped in v10; use standard{}interpolation source -
BREAKING:
vue-i18n-bridge— dropped in v10 following Vue 2 EOL source -
BREAKING:
allowCompositionOption — dropped in v10; was previously used for Legacy to Composition API migration on v9 source
Also changed: petite-vue-i18n GA v10 · Configurable $i18n type new v11.1.0 · mode property deprecated v11 · tm accepts DefineLocaleMessage key type v11.0.0 · Part options support $n & $d new v11.1.4
Best Practices
-
Prefer Composition API mode (
legacy: false) for all new projects — Legacy API mode is deprecated in v11 and will be removed in v12 source -
Use
t()function or<i18n-t>component over thev-tdirective — the directive is deprecated in v11 and lacks IDE support for key completion source -
Define global resource schemas using
DefineLocaleMessage,DefineDateTimeFormat, andDefineNumberFormatinterfaces — enables automatic type inference and key completion inuseI18nwithout passing type parameters source -
Use
rt()(Resolve Translation) when processing locale messages retrieved viatm()— ensures proper resolution of nested structures and pluralization for programmatically accessed messages -
Enable
escapeParameter: truewhen usingv-htmlwith translations containing user input — prevents XSS by escaping interpolation parameters and neutralizing dangerous HTML attributes -
Explicitly configure
__VUE_I18N_FULL_INSTALL__and__VUE_I18N_LEGACY_API__feature flags — setting these tofalsein bundler configuration enables better tree-shaking and reduces bundle size source -
Pre-compile locale messages using
@intlify/unplugin-vue-i18n— improves performance by using AST/Functions and ensures CSP compliance by avoidingevalduring runtime compilation source -
Implement lazy loading for locale messages using dynamic
import()andsetLocaleMessage()— reduces initial bundle size by loading language resources only when needed (e.g., in router guards) source -
Synchronize the
htmllangattribute andAccept-Languageheaders when switching locales — ensures accessibility (screen readers) and consistent language handling for server-side requests source
When not to use it
- →When the user is not working with vue-i18n
- →When the user needs to use the legacy API mode, which is deprecated
- →When the user needs to use the v-t custom directive, which is deprecated
Limitations
- →This skill is specific to the intlify/vue-i18n library
- →This skill's guidance is based on [email protected] and earlier versions
- →This skill does not provide solutions for other internationalization libraries
How it compares
This workflow offers specific, version-aware advice for vue-i18n, contrasting with general internationalization approaches.
Compared to similar skills
vue-i18n-skilld side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| vue-i18n-skilld (this skill) | 0 | 3mo | No flags | Intermediate |
| vue-best-practices | 19 | 5mo | No flags | Intermediate |
| vue-testing-best-practices | 5 | 6mo | No flags | Intermediate |
| vue-debug-guides | 4 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
vue-best-practices
antfu
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
vue-testing-best-practices
vuejs-ai
Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
vue-debug-guides
vuejs-ai
Vue 3 debugging and error handling for runtime errors, warnings, async failures, and SSR/hydration issues. Use when diagnosing or fixing Vue issues.
vue-router-best-practices
antfu
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
vueuse
onmax
Use when working with VueUse composables - provides reactive utilities for state, browser APIs, sensors, network, animations. Check VueUse before writing custom composables - most patterns already implemented.
frontend-vue-development
TencentBlueKing
前端 Vue 开发规范,涵盖 Vue 2/3 组件开发、Vuex 状态管理、路由配置、组件通信、样式规范、国际化。当用户进行前端开发、编写 Vue 组件、处理状态管理或实现页面交互时使用。