vue-i18n-skilld by harlan-zw/vue-ecosystem-skills
npx skills add https://github.com/harlan-zw/vue-ecosystem-skills --skill vue-i18n-skilldvue-i18nVue.js 国际化插件
版本: 11.3.0 依赖: @vue/devtools-api@^6.5.0, @intlify/core-base@11.3.0, @intlify/devtools-types@11.3.0, @intlify/shared@11.3.0 标签: rc: 9.0.0-rc.9, alpha: 9.2.0-alpha.9, legacy: 8.28.2, edge: 9.3.0-beta.14-77e850b, beta: 9.3.0-beta.27, next: 12.0.0-alpha.3, stable: 11.1.10, legacy10: 10.0.8, stable9: 9.14.5, legacy9: 9.14.5, latest: 11.3.0
参考: 文档 — API 参考、指南 • GitHub Issues — 错误、变通方案、边界情况 • GitHub Discussions — 问答、模式、方案 • 发布说明 — 变更日志、破坏性变更、新 API
本节记录特定版本的 API 变更 — 请优先关注近期的主要/次要版本。
已弃用: 传统 API 模式 — 在 v11 中弃用,推荐使用组合式 API;计划在 v12 中移除 来源
自定义指令 — 由于在 Vue 3 中优化收益有限,在 v11 中弃用;计划在 v12 中移除
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
v-t破坏性变更: tc 和 $tc — 在 v11 中针对传统 API 模式移除;请改用 t 和 $t 中的复数支持 来源
新增: Vue 3 Vapor 模式 — 在 v11.2.0 中添加了对 Vue 3 vapor 模式的兼容性支持 来源
破坏性变更: JIT 编译 — 在 v10 中默认启用,以解决 CSP 问题并支持动态资源 来源
破坏性变更: $t 和 t 签名 — v10 中传统 API 模式的签名已更改,以匹配组合式 API 模式;位置性的语言环境参数现在需要选项对象 来源
新增: 生成的语言环境类型 — v10 增加了通过 GeneratedTypeConfig 扩展语言环境类型的支持,以获得更好的 TypeScript 推断 来源
破坏性变更: 取模 % 语法 — v10 中移除了使用取模语法的命名插值;请使用标准的 {} 插值 来源
破坏性变更: vue-i18n-bridge — 随着 Vue 2 生命周期结束,在 v10 中移除 来源
破坏性变更: allowComposition 选项 — 在 v10 中移除;之前用于 v9 上从传统 API 迁移到组合式 API 来源
其他变更: petite-vue-i18n 正式发布 v10 · 可配置的 $i18n 类型 新增于 v11.1.0 · mode 属性 弃用于 v11 · tm 接受 DefineLocaleMessage 键类型 v11.0.0 · 部分选项支持 $n 和 $d 新增于 v11.1.4
新项目优先使用组合式 API 模式 (legacy: false) — 传统 API 模式已在 v11 中弃用,并将在 v12 中移除 来源
使用 t() 函数或 <i18n-t> 组件替代 v-t 指令 — 该指令已在 v11 中弃用,并且缺乏 IDE 对键补全的支持 来源
使用 DefineLocaleMessage、DefineDateTimeFormat 和 DefineNumberFormat 接口定义全局资源模式 — 无需传递类型参数即可在 useI18n 中启用自动类型推断和键补全 来源
处理通过 tm() 获取的语言环境消息时,使用 rt()(解析翻译) — 确保对以编程方式访问的消息中的嵌套结构和复数形式进行正确解析
当在包含用户输入的翻译中使用 v-html 时,启用 escapeParameter: true — 通过转义插值参数和中和危险的 HTML 属性来防止 XSS 攻击
显式配置 __VUE_I18N_FULL_INSTALL__ 和 __VUE_I18N_LEGACY_API__ 特性标志 — 在打包器配置中将它们设置为 false 可以实现更好的 Tree Shaking 并减少包体积 来源
使用 @intlify/unplugin-vue-i18n 预编译语言环境消息 — 通过使用 AST/函数提高性能,并通过避免运行时编译中的 eval 确保 CSP 合规性 来源
使用动态 import() 和 setLocaleMessage() 实现语言环境消息的懒加载 — 仅在需要时(例如在路由守卫中)加载语言资源,以减少初始包体积 来源
切换语言环境时,同步 html 的 lang 属性和 Accept-Language 请求头 — 确保辅助功能(屏幕阅读器)和服务器端请求的语言处理一致性 来源
每周安装量
103
代码仓库
GitHub 星标数
148
首次出现
2026年2月19日
安全审计
安装于
github-copilot86
codex84
gemini-cli83
opencode83
amp82
kimi-cli82
vue-i18nInternationalization plugin for Vue.js
Version: 11.3.0 Deps: @vue/devtools-api@^6.5.0, @intlify/core-base@11.3.0, @intlify/devtools-types@11.3.0, @intlify/shared@11.3.0 Tags: rc: 9.0.0-rc.9, alpha: 9.2.0-alpha.9, legacy: 8.28.2, edge: 9.3.0-beta.14-77e850b, beta: 9.3.0-beta.27, next: 12.0.0-alpha.3, stable: 11.1.10, legacy10: 10.0.8, stable9: 9.14.5, legacy9: 9.14.5, latest: 11.3.0
References: Docs — API reference, guides • GitHub Issues — bugs, workarounds, edge cases • GitHub Discussions — Q&A, patterns, recipes • Releases — changelog, breaking changes, new APIs
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: tc and $tc — dropped in v11 for Legacy API mode; use pluralization support in t and $t instead 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: $t and t Signatures — 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 GeneratedTypeConfig for 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: allowComposition Option — 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
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 the v-t directive — the directive is deprecated in v11 and lacks IDE support for key completion source
Define global resource schemas using DefineLocaleMessage, DefineDateTimeFormat, and DefineNumberFormat interfaces — enables automatic type inference and key completion in useI18n without passing type parameters
Weekly Installs
103
Repository
GitHub Stars
148
First Seen
Feb 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot86
codex84
gemini-cli83
opencode83
amp82
kimi-cli82
HeroUI v2 到 v3 迁移指南:破坏性变更、复合组件、Tailwind v4 升级
533 周安装
Symfony 运行器选择:优化架构与工作流,安全执行复杂变更 | Symfony 项目开发工具
195 周安装
Hyvä CMS组件导出工具 - 一键合并Magento模块组件定义JSON
198 周安装
AI反泛化工具:检测和清理文本、代码、设计中的AI生成模式,提升内容质量
198 周安装
tmux编程控制交互式命令:自动化vim、git rebase、REPL等终端应用
195 周安装
AI输出净化器 - 自动扫描脱敏API密钥、PII等敏感信息,保障数据安全
197 周安装
微信公众号写作系统 - 全自动AI写作工具,支持素材检索、初稿生成、润色配图
76 周安装
Use rt() (Resolve Translation) when processing locale messages retrieved via tm() — ensures proper resolution of nested structures and pluralization for programmatically accessed messages
Enable escapeParameter: true when using v-html with 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 to false in 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 avoiding eval during runtime compilation source
Implement lazy loading for locale messages using dynamic import() and setLocaleMessage() — reduces initial bundle size by loading language resources only when needed (e.g., in router guards) source
Synchronize the html lang attribute and Accept-Language headers when switching locales — ensures accessibility (screen readers) and consistent language handling for server-side requests source