Fits Existing Projects
Supports Vue, JS, JSX, TS, TSX, JSON and other common business files. Compatible with both English and non-English source code migration.
Extract source language text from Vue, React, JS/TS projects, generate locale files, and replace source with $t calls.
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:
<template>
<h1>留言({{ remarkList ? remarkList.length : 0 }})</h1>
<button>登录</button>
</template>Typical output:
<template>
<h1>{{ $t('vue3All.leave_a_message') }}({{ remarkList ? remarkList.length : 0 }})</h1>
<button>{{ $t('vue3All.login') }}</button>
</template>Also generates locale files:
{
"leave_a_message": "留言",
"login": "登录"
}