Our recent translation models for Chinese all have ‘zh’ as a language code (ISO-639-1), and now support several locales (zh-CN, zh-TW or zh-HK).
However, we had in the past non-ISO codes to indicate Traditional Chinese support (zt or zh-Hant).
Behavior comparison:
ses-gateway < 9.11.0 |
ses-gateway => 9.11.0 ses-gateway sts10 |
|
TL;DR |
ZH and ZT are 2 languages/models.
API do not support locales but translation profiles to adjust and select the locales (set in profiles) |
ZH new model is multi-locale and the way to go.
New API parameter "modelOptions" to set a locale.
ZT is redirected to ZH-TW.
API still supports translation profiles. Also see Gateway Compatibility mode below |
What if I translate from/to ZH | ZH model is used. | |
What if I translate from/to ZT | ZT model is used | ZH model is used, and ZH-TW locale is applied |
What if I translate from/to zh-Hant | ||
What if I translate from/to zh-Hans |
ZH model is used. In addition, you can use a profile to target a ZH-TW or ZH-HK model. |
ZH model is used |
What if I translate from/to ZH and apply a locale (ZH-TW or ZH-HK) | Not supported | ZH model is used, and locale is applied |
Gateway Compatibility Mode
In order to keep compatibility with old API implementations or third party connectors to SYSTRAN translations even if new engines are deployed, we have introduced a new mode for TraditionalChinese API code management here:
Gateway:
InputInterfaces:
translate-api:
chineseTraditional:
mode: legacy # mode "legacy" or "new"
defaultLocale: zh-TW # for mode: new, possible choices : "zh-TW" or "zh-HK"
- The legacy (default) mode will keep as is the language codes for Traditional Chinese. Use this one if you have old engines installed (or have no issues regarding this subject)
- The new mode will implement redirections to the proper locale of ZH engines when receiving non ISO legacy codes.