The current implementation lacks handling for regional variants, which affects languages like Chinese (zh-Hans/zh-Hant) and Portuguese (pt-BR/pt-PT). This is particularly noticeable with Chinese translations where the distinction between Simplified and Traditional Chinese is not properly maintained.
Current Behavior
When translating to Chinese variants (zh-Hans/zh-Hant), the regional variant information is lost because CommonJobParams.RegionalVariant is not set in the request. The current code only sends:
The current implementation lacks handling for regional variants, which affects languages like Chinese (zh-Hans/zh-Hant) and Portuguese (pt-BR/pt-PT). This is particularly noticeable with Chinese translations where the distinction between Simplified and Traditional Chinese is not properly maintained.
Current Behavior
When translating to Chinese variants (zh-Hans/zh-Hant), the regional variant information is lost because
CommonJobParams.RegionalVariant
is not set in the request. The current code only sends:Expected Behavior
The request should handle regional variants by:
TargetLang
RegionalVariant
Example implementation like PR #118:
This matches the behavior of DeepL's website, which uses:
Additional Notes
CommonJobParams
struct to include theRegionalVariant
field