This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 9 replies, has 1 voice.
Last updated by HANS 6 days ago.
Assisted by: Cristian-Corneliu Somesan.
| Author | Posts |
|---|---|
| January 16, 2026 at 11:22 am #17736628 | |
|
HANS |
# WPML Glossary Bug Report: Language Variants Not Handled Correctly ## Summary **Critical Bug**: The WPML Glossary feature cannot properly handle languages with multiple country-specific variants (e.g., French as `fr` and `ch-fr`). The backend API assigns the same translation ID to different language variants and copies the wrong translation text, causing data loss. ## Environment - **WPML Version**: 4.8.6 ## Problem When creating a glossary entry with translations for both `fr` (French - Custom) and `ch-fr` (French - Switzerland), only one translation is displayed correctly. The other shows an "add translation" button, and the translation text is incorrect. **Example**: Glossary entry "english-en-entry2" (ID: 1680360) ## Critical Backend Bug Evidence **Request sent to `POST /api/wpml/widget/glossary_terms/create_or_update`**: ```json **Response from API**: ```json **Issues**: 1. Both `fr` and `ch-fr` receive the **same translation ID** (7541183) - they should have unique IDs ## Root Cause The `create_or_update` endpoint treats language variants (e.g., `fr` and `ch-fr`) as if they share the same translation record, when they should be completely separate records with unique IDs and their own translation text. ## Steps to Reproduce 1. Navigate to WPML → Translation Dashboard → Glossary ## Expected Fix 1. **Backend**: Each language variant should have its own unique translation record with a unique ID ## Affected Entries - "english-entry" (ID: 1680345) - both `fr` and `ch-fr` have ID 7541012 The issue affects all languages with multiple country variants (French, German, Italian). |
| January 16, 2026 at 12:31 pm #17736891 | |
|
HANS |
Here's the requested screenshot of WPML > Languages > Edit Languages |
| January 16, 2026 at 1:59 pm #17737253 | |
|
Jakub Bis WPML Supporter since 12/2025 Languages: English (English ) Timezone: Asia/Manila (GMT+08:00) |
Hello Hans, I am Jakub Bis, WPML developer. First of all, I would like to thank you for the exceptionally detailed and accurate description of the issue. It is very helpful. I will try to reproduce the issue on my side now and evaluate the complexity of the bug fix. I will come back to you with an update as soon as I have more information. |
| January 19, 2026 at 2:25 pm #17742921 | |
|
HANS |
Hello Jakub, You're welcome. |
| January 20, 2026 at 1:34 pm #17746647 | |
|
Gabriele Bazzotti |
Hi Hans, |
| January 22, 2026 at 12:38 pm #17753883 | |
|
HANS |
Hi Gabriele, The current situation prevents us from using the glossary for words which differ between countries. Regards |
| January 27, 2026 at 2:55 pm #17767868 | |
|
Cristian-Corneliu Somesan Supporter |
Hello Hans, Thank you very much for your patience and for the detailed information you have provided in this thread. It has been extremely helpful. I would like to clarify how WPML handles custom language mappings, as this is related to the behaviour you are seeing in the glossary. In your configuration, ch-fr is mapped to fr. When a language variant is mapped this way, WPML does not treat ch-fr as an independent translation target. Instead, translation jobs that appear to be targeted at ch-fr are internally created and processed as fr because of the mapping. In other words, the target language of the job becomes fr as a direct result of the mapping. This is why glossary terms for ch-fr are not stored separately from fr: the system cannot distinguish them during translation. From a technical perspective, this means that the behaviuor you observed (same ID and text for both variants) is expected when ch-fr is mapped to fr. That said, we may not fully understand your intended workflow, so it would be very helpful if you could clarify exactly what you need to achieve. For example, do you need: 1. Separate glossary terms for fr and ch-fr that are both respected during translation in the ATE editor, or Understanding the goal will allow us to determine whether this is a configuration issue, a technical limitation of the mapping mechanism, or a feature request for a different workflow. Thank you again for the detailed report and for working with us on this. Kind regards, |
| February 2, 2026 at 10:48 am #17783312 | |
|
HANS |
Hi Cristian, I talked to the customer about the issue. They tell me, that they don't know of any case, where the glossary entry needs to be different for two instances of the same language. I'm not sure how this is best solved. One last question. Kind Regards |
| February 2, 2026 at 2:29 pm #17784385 | |
|
Cristian-Corneliu Somesan Supporter |
Hi Simon, Thanks a lot for checking with the customer and for the detailed explanation. We’ve created a ticket on our side to address this as a UX issue in the glossary GUI. We’ll look into improving how this is handled visually to avoid confusion. To answer your last question: yes, using the glossary as it is should work correctly. The current issue is limited to the GUI and does not affect the underlying functionality or how the glossary is applied. Thanks again for the input — it’s very helpful. Kind regards, |
| February 9, 2026 at 7:59 am #17803944 | |
|
HANS |
Hi Cristian, Thanks for your help! Kind regards, |
