Problem/ Motivation

As an editor i want to use all languages available for the glossary functionality.
With the latest updates, all languages available for translations are now supported by the glossary.

Proposed resolution

User interface changes

Original Issue

I tried to add Arabic language glossary, but could not find the language on either the Source or Target language dropdown.

CommentFileSizeAuthor
DeepLGlossary.png103.89 KBsachit.thapa
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

sachit.thapa created an issue. See original summary.

steffenr’s picture

Assigned: sachit.thapa » Unassigned
Category: Bug report » Feature request
Priority: Major » Normal
Status: Active » Closed (works as designed)

The language Arabic is not supported by the API for now.
Available languages are listed here: https://developers.deepl.com/docs/api-reference/glossaries/openapi-spec-...

Once the language is available via the API, i'll update the tmgmt_deepl_glossary submodule.

sachit.thapa’s picture

I made a GET request to the https://api.deepl.com/v2/glossary-language-pairs endpoint. While the response included multiple language pairs, I'm only including the English to Arabic pair:
{
"supported_languages": [
{
"source_lang": "en",
"target_lang": "ar"
}
]
}
Thank you for looking at this. :)

steffenr’s picture

Title: DeepL glossary missing Arabic as source and target language » Add Arabic as new language for glossary source and target language
Version: 2.3.x-dev » 2.2.x-dev
Issue summary: View changes
Status: Closed (works as designed) » Active

Oh - you are right.
Since April 2025 all source languages are available for the glossary functionality and via the API endpoint.

steffenr’s picture

Title: Add Arabic as new language for glossary source and target language » Add new languages for glossary source and target languages
Issue summary: View changes
steffenr’s picture

Issue summary: View changes
steffenr’s picture

Assigned: Unassigned » steffenr
steffenr’s picture

Issue summary: View changes
steffenr’s picture

Issue summary: View changes
steffenr’s picture

Component: Code » tmgmt_deepl_glossary

sachit.thapa’s picture

Thank you once again for taking care of this, but the merge failed due to phpcs and phpstans :(

steffenr’s picture

Assigned: steffenr » Unassigned
Status: Active » Needs review

@sachit.thapa: The tests for phpstan (next minor) won't be fixed for the 2.2.x release.
Those are handled in 2.3.x - were all pipelines are green.

It would be great, if you could test the Merge Request with version 2.2.x on you projects and provide feedback. Afterward i'll integrate the feature into 2.3.x.

sachit.thapa’s picture

@steffenr, ! I've downloaded and tested MR !39 in my environment using version 2.2.x. I was able to see Arabic in both the source and target language as expected. I uploaded the glossary via Postman using the API endpoints, and everything worked smoothly without the issues I encountered earlier. I also tested editing and saving through Drupal, and it produced the expected results. Looks good on my end! Thanks

sachit.thapa’s picture

Status: Needs review » Reviewed & tested by the community
steffenr’s picture

I just had a look at related issues, which would be affected by the Merge Request.
I have to make some more changes to the selection of languages, since custom langcodes, which are mapped in the translator configuration won't show up.

steffenr’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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