Skip to content

hias-cliInternationalization Toolchain

Extract source language text from Vue, React, JS/TS projects, generate locale files, and replace source with $t calls.

hias-cli

What Problem Does It Solve

hias-cli's translation capability migrates source language text in your project to internationalized calls. Source code can be Chinese or English; control translation direction via locales.

Typical input:

vue
<template>
  <h1>留言({{ remarkList ? remarkList.length : 0 }})</h1>
  <button>登录</button>
</template>

Typical output:

vue
<template>
  <h1>{{ $t('vue3All.leave_a_message') }}({{ remarkList ? remarkList.length : 0 }})</h1>
  <button>{{ $t('vue3All.login') }}</button>
</template>

Also generates locale files:

json
{
  "leave_a_message": "留言",
  "login": "登录"
}
  1. Start with Quick Start to run a single file translation.
  2. Then read Translate File to understand extraction and replacement rules.
  3. If your company has translation tables, continue with Cache Import.
  4. Before batch execution or CI integration, see Reports & Checks.
  5. For edge cases, check FAQ.

Released under the MIT License.