Problem/Motivation

If you install "Chinese, Simplified" language in Drupal, il uses the 'zh-hans' langcode.
"Chinese, Traditional" uses 'zh-hant'.
For the moment, the module indicates that translation in these two language codes is not supported, although the Deepl api does support them in target_lang.
https://developers.deepl.com/docs/fr/api-reference/translate/openapi-spec-for-text-translation

Proposed resolution

Update getSupportedRemoteLanguages() and getDefaultRemoteLanguagesMappings()

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cyrille.miskiewicz created an issue. See original summary.

steffenr’s picture

Additional info: https://www.deepl.com/en/blog/deepl-translator-now-supports-traditional-...

@cyrille.miskiewicz: Feel free to add a MR adding the new language.

cyrille.miskiewicz changed the visibility of the branch 3483438-support-chinese-zh-hans-zh-hant to hidden.

cyrille.miskiewicz’s picture

Patch is working, but phpunit test fails because :
"Unable to install modules: module 'tmgmt_deepl_test' is incompatible with this version of Drupal core." (11.0.5)

steffenr’s picture

Assigned: Unassigned » steffenr

I'll have a look on the issue. Looks like the configuration of the unit tests needs to be updated.

steffenr’s picture

Version: 2.2.6 » 2.2.7
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.