Skip to content

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.xlsx

Or use the short command:

sh
hias tci .\.hias\company.xlsx

.xlsx is recommended. The first row contains language codes, and each subsequent row is one text entry.

zh-CNen-USja-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

FormatDescription
.xlsxRecommended format, suitable for company maintenance
.xlsm / .xlsCompatible for import
.tsv / .txtTab-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-CN

Specify worksheet:

sh
hias tci .\.hias\company.xlsx --sheet Sheet1

Overwrite existing cache:

sh
hias tci .\.hias\company.xlsx --overwrite

When to Use

Import your company's glossary before batch translation, especially in these scenarios:

  1. Short words like login, menu, button, and status need consistent capitalization.
  2. Your company already has multilingual assets and you don't want to call machine translation again.
  3. Languages like Japanese and Korean need human translation for natural expression.
  4. Multiple projects share the same business terminology.

Released under the MIT License.