vue-i18n-skilld
npx skills add https://github.com/harlan-zw/vue-ecosystem-skills --skill vue-i18n-skilld
Agent 安装分布
Skill 文档
intlify/vue-i18n vue-i18n
Version: 11.2.8 (Dec 2025) Deps: @vue/devtools-api@^6.5.0, @intlify/core-base@11.2.8, @intlify/shared@11.2.8 Tags: rc: 9.0.0-rc.9 (Feb 2021), alpha: 9.2.0-alpha.9 (Jul 2021), legacy: 8.28.2 (Oct 2022), edge: 9.3.0-beta.14-77e850b (Jan 2023), beta: 9.3.0-beta.27 (Aug 2023), next: 12.0.0-alpha.3 (Jul 2025), stable: 11.1.10 (Jul 2025), legacy10: 10.0.8 (Jul 2025), stable9: 9.14.5 (Jul 2025), legacy9: 9.14.5 (Jul 2025), latest: 11.2.8 (Dec 2025)
References: Docs â API reference, guides ⢠GitHub Issues â bugs, workarounds, edge cases ⢠GitHub Discussions â Q&A, patterns, recipes ⢠Releases â changelog, breaking changes, new APIs
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