Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>HZWX i18nNew to Visual Studio Code? Get it now.
HZWX i18n

HZWX i18n

hzwx

| (0) | Free
鼠标悬浮到国际化 key 上时显示语言包中配置的原文与译文,支持模板语法
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

HZWX i18n — VSCode 国际化悬浮提示插件

鼠标悬浮到代码中的 $t('key') 国际化 key 上时,自动显示所有语言包的翻译文本,并高亮模板变量。

功能

  • ✅ 悬浮显示所有语言的翻译文本(zh-CN / en-US / zh-Hant)
  • ✅ 支持 {variable} ICU 模板变量高亮
  • ✅ 支持 useIntl(prefix) 前缀拼接
  • ✅ 语言文件变更后自动重新加载

使用方式

  1. 安装依赖:npm install
  2. 编译:npm run compile
  3. 按 F5 启动 Extension Development Host
  4. 在宿主窗口打开含有 $t() 调用的文件
  5. 鼠标悬浮到 key 字符串上即可看到翻译

配置项

在 VSCode 设置中搜索 hzwx-i18n:

配置项 默认值 说明
hzwx-i18n.localesPath src/i18n/components 语言文件目录(相对于工作区)
hzwx-i18n.defaultLocale zh-CN 原文/默认语言
hzwx-i18n.functionNames ["$t"] 国际化函数名列表
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft