Cache Import
cache-import imports your company's existing translation tables into .hias/.translation-cache.json for reuse in subsequent translations.
Command
sh
hias cache-import .\.hias\company.xlsxOr use the short command:
sh
hias tci .\.hias\company.xlsxRecommended Format
.xlsx is recommended. The first row contains language codes, and each subsequent row is one text entry.
| zh-CN | en-US | ja-JP |
|---|---|---|
| 登录 | Login | ログイン |
| 正常状态 | Normal Status | 正常状態 |
| 请输入用户名 | Please Enter Username | ユーザー名を入力してください |
This format is friendly for product, operations, and translation teams, and makes it easy to add language columns later.
Supported Formats
| Format | Description |
|---|---|
.xlsx | Recommended format, suitable for company maintenance |
.xlsm / .xls | Compatible for import |
.tsv / .txt | Tab-separated plain text tables |
Multilingual Write Method
The import tool writes each target language to the translation cache:
json
{
"zh-CN|en-US": {
"登录": "Login"
},
"zh-CN|ja-JP": {
"登录": "ログイン"
}
}When translating from zh-CN to en-US or ja-JP, the cache is prioritized.
Common Options
Specify source language:
sh
hias tci .\.hias\company.xlsx --source zh-CNSpecify worksheet:
sh
hias tci .\.hias\company.xlsx --sheet Sheet1Overwrite existing cache:
sh
hias tci .\.hias\company.xlsx --overwriteWhen to Use
Import your company's glossary before batch translation, especially in these scenarios:
- Short words like login, menu, button, and status need consistent capitalization.
- Your company already has multilingual assets and you don't want to call machine translation again.
- Languages like Japanese and Korean need human translation for natural expression.
- Multiple projects share the same business terminology.