Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>multi-lang-assistorNew to Visual Studio Code? Get it now.
multi-lang-assistor

multi-lang-assistor

wangeastsea

|
13 installs
| (0) | Free
一个鼠标悬浮显示多语言文案的助手
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

multi-lang-assistor README

配套 usmart-i18n 使用

支持语法

export default {
    i18n: {
        zhCHS: {
            hello: 'hello'
        }
    }
}

其他如:扩展符、函数等语法不支持,将会解析失败

usage

安装之后,自动全局生效

将鼠标 hover 在多语言上,即会显示该多语言的中文文案

多语言书写格式如下,hover 在 hello 文案上,将会显示 hello 对应的中文文案

// 只要是 $t('xxxx') 形式就会进行 i18n 的 key 的匹配获取
// 匹配代码如下: 
// let i18nKey = word.match(/\$t\('(.+)'\)/)[1]
$t('hello')

目前会获取当前组件的 i18n 对象去匹配多语言

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft