AIFENG DCS · Built-in Translation Center

No paid APIs · L1 dictionary in milliseconds · L2 local open-source engine · L3 free fallback · LLM for hard sentences only · Language: zh-CN | id-ID | en-US

Open-Source Engine Deployment Plan (Layer L2)

Both L2 candidates are free open source and can run offline on this machine. This page is comparison and steps only; every install action awaits boss approval (PENDING).

Argos Translate vs LibreTranslate

ItemArgos TranslateLibreTranslate
What it isA Python translation library that runs offline, installed via pipA self-hosted translation API service (also powered by Argos models), REST interface
Installationpip install argostranslate + import .argosmodel model packagespip install libretranslate or Docker; listens on a local port (e.g. :5000) after start
Footprint / model sizeProgram tens of MB; each language-pair model about 100–300 MB (estimate), download on demandSame (reuses Argos models); Docker image adds about 1–2 GB (estimate)
Offline✅ Fully offline once models are downloaded✅ Fully offline (local service)
Quality expectationGood for short general sentences; Indonesian is medium; industry terms must be protected by the L1 dictionarySame as Argos (same models); adds an HTTP API so every module can call it
Best fitBackend scripts, batch jobs, queue workers call it directly via importMany modules share one translation HTTP service (mall/CS/tickets all call it)
Language pairs we needzh↔en and en↔id have ready models; zh↔id has no direct model and goes through English pivot (zh→en→id); the quality loss is patched by L1 dictionary post-processing.

Installation Steps (all PENDING)

Step 1 · Download models (on an online computer) PENDING · awaiting boss approval

Download the zh↔en and en↔id .argosmodel packages (about 100–300 MB each, estimate) and archive them in runtime/translate-models/.

PENDING · awaiting boss approval
Step 2 · Install Argos offline PENDING · awaiting boss approval

pip install argostranslate; then argospm install pointing at the local .argosmodel files, no network needed.

PENDING · awaiting boss approval
Step 3 · Run the LibreTranslate local service PENDING · awaiting boss approval

pip install libretranslate, listen on 127.0.0.1 only, never exposed; reuse the same model directory to provide one translation API for mall/CS/ticket modules.

PENDING · awaiting boss approval
Step 4 · Integration test with the L1 dictionary PENDING · awaiting boss approval

Run 100 real business sentences (quotation/logistics/tax); term accuracy must be 100% (protected by L1); sentence readability is manually sampled and reported to the boss.

PENDING · awaiting boss approval

Offline package plan

If the server has no internet: download models on an online computer → copy via USB / intranet to the server → install locally; the server never needs to go online. Model packages and install scripts join the backup system.

How L2 cooperates with the L1 dictionary

① Pre-translation protection: replace L1-matched industry terms with placeholders (e.g. __TERM_17__) so the engine cannot mistranslate jargon.
② Engine translation: L2 only translates the plain sentences around the placeholders.
③ Post-translation restore: swap placeholders back to the standard target-language terms (from the L1 dictionary), keeping terms 100% correct.
⚠ The boss is asked again before every single step starts