Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where the URL slug is encoded instead of copying the original English slug when translations are published from MemoQ, despite WPML being configured to "Copy from original language if translation language uses encoded URLs". The client is also seeking guidance on configuring the integration between WPML and MemoQ using Custom XML Configuration.
Solution:
First, we asked the client to provide an example of the encoded URL slug and the XLIFF file from MemoQ. We also suggested testing the issue with only WPML plugins enabled to rule out any conflicts.
After further investigation, we tested the feature locally and found that it worked correctly for the Ukrainian language without using a translation service. We suggested that the client try translating a page themselves to see if the issue persists and to confirm whether they are using a regular WordPress custom post type.
We then conducted additional tests to simulate the process of exporting and importing XLIFF files and found that the feature worked as expected. We recommended that the client try with a new page or make minor changes to the original language of an existing page, then download and import the XLIFF file again to see if the issue is resolved.
If the solution provided here does not apply or is outdated, or if you're still facing issues, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us.

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 12 replies, has 2 voices.

Last updated by Andrey 1 year ago.

Assisted by: Andrey.

Author Posts
March 18, 2024 at 4:10 am #15419094

ryanK-11

Hello, I'm having an issue between WPML and MemoQ.

The issue is whenever I get a translation back from MemoQ and I publish that translation It uses an encoded URL slug instead of the original English slug when I have configured WPML to "Copy from original language if translation language uses encoded URLs".

and I can't find a way to somehow configure the integration between WPML and MemoQ using Custom XML Configuration (https://wpml.org/documentation/support/language-configuration-files/).

I'm currently looking at these hooks: wpml_tm_xliff_export_original_cf, and wpml_tm_save_translation_cf. but I can't be sure if I could somehow unset the post_slug before sending it to memoQ (I'm assuming WPML sends the translation jobs via XLIFF files which MemoQ then uses for translation)

Is there any way for me to fix this issue?

WPML-Bug.PNG
March 18, 2024 at 2:39 pm #15421702

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Please show me an example of an encoded URL slug you are struggling with. Can you also send us the XLIFF file obtained from MemoQ?

It would also help, if you can test this only with WPML plugins enabled.

March 18, 2024 at 8:24 pm #15423345

ryanK-11

Hello Andrey,

Sure thing, so it's something like this I have an article in English called "The Best Article For X"
then I send that to memoQ for translation in these particular languages "Japanese, Thai, Chinese, and Viet". After getting the translation from MemoQ The article title also gets translated right, so for some reason WPML generates the slug using the Article title when I have configured it to Copy from the original Language if it uses Encoded URLs.

I could send one, but I don't see any option on how to send a file.
But here's the important snippet In my opinion:
<trans-unit extradata="field-_yoast_wpseo_metadesc" resname="field-_yoast_wpseo_metadesc-0" restype="string" datatype="html" id="field-_yoast_wpseo_metadesc-0">
<source><![CDATA[Don’t miss these top things to do in Vientiane during a trip to Laos. The capital city flaunts historic monuments and modern landmarks.]]></source>
<target><![CDATA[กิจกรรมห้ามพลาดในเวียงจันทน์ระหว่างเดินทางท่องเที่ยวลาว เมืองหลวงของลาวเต็มไปด้วยอนุสาวรีย์เก่าแก่และแลนด์มาร์กสมัยใหม่]]></target>
</trans-unit>
<trans-unit extradata="field-_yoast_wpseo_focuskw" resname="field-_yoast_wpseo_focuskw-0" restype="string" datatype="html" id="field-_yoast_wpseo_focuskw-0">
<source><![CDATA[things to do in vientiane]]></source>
<target><![CDATA[ที่เที่ยวเวียงจันทน์]]></target>
</trans-unit>
<trans-unit extradata="Title" resname="title" restype="string" datatype="html" id="title">
<source><![CDATA[Things to Do in Vientiane - Top Attractions, Landmarks and Places to Stay Nearby]]></source>
<target><![CDATA[ที่เที่ยวเวียงจันทน์ – สถานที่ท่องเที่ยวยอดนิยม แลนด์มาร์กสำคัญและที่พักใกล้เคียง]]></target>
</trans-unit>

I could disable other Plugins, but it would bring the website down as I'm using them on other part for the Articles as well, so I doubt I could achieve anything with it.

March 19, 2024 at 10:55 am #15425719

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for the detailed explanation. To enable the feature "Copy from original language if translation language uses encoded URLs" to work as expected, you need to indicate in language settings that your languages are using encoded URLs. To do this, please follow the steps below:

1. Go to WPML → Languages → Edit languages
2. Set "Japanese, Thai, Chinese, and Viet" to be encoded
3. Save the changes

Once you have completed the above steps, you can test this by translating the page yourself.

I hope this helps.

March 20, 2024 at 2:12 am #15429258

ryanK-11

Hello Andrey,

Thank you for your response, but the said Languages is already set as URL Encoded,
but it is still not following the WPML configuration

vi.PNG
kr.PNG
jp.PNG
ch.PNG
March 20, 2024 at 9:06 am #15430030

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for the update. I tested the feature locally on one of the pages and found that it works for the Ukrainian language. I didn't use a translation service. Have you tried translating the page yourself? If not, I suggest you give it a try. Also, can you confirm if it is a regular WordPress custom post type, such as Pages or Posts, or if you are using a custom post type?

March 20, 2024 at 1:11 pm #15431655

ryanK-11

Hello Andrey,

Sorry as of right now we have linguistics to translate multiple articles in a day.
I'm using a Custom Post Type for this, and I agree that if you translate any article within wordpress it follows the WPML configuration correctly. The issue here is that whenever we try to use MemoQ it doesn't follow it, its just confusing as to why it wouldn't follow the WPML configuration when it comes from the 3rd party options.

March 20, 2024 at 7:32 pm #15433569

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. Please allow me to consult the team regarding this and keep you updated.

March 22, 2024 at 11:31 am #15440080

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I appreciate your patience. I have conducted further tests on my local environment to imitate the process of exporting and importing XLIFF files, similar to how translation services send back the translated files. According to the results of my tests, the feature works properly, and the translated page has copied slug as if I had done the translations myself.

Based on this, I believe that the jobs may have already been sent in your case before the changes were made. To test this, you could try with a new page or make minor changes to the original language of an an existing page and then download and import the XLIFF file again.

March 26, 2024 at 11:02 pm #15453207

ryanK-11

Thank you for your Response andrey.
I will test this out and record it, I'll send out the loom link for you to view the results if it ends up not resolving my issue.

March 27, 2024 at 8:19 am #15453845

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. Please test it using a new page to ensure that the settings changes have been applied.

April 1, 2024 at 10:42 am #15468801

ryanK-11

Hello Andrey.

Just got back from a long holiday, I'm still waiting for the Translation Manager to send me the new page in memoQ so I can demonstrate everything according to the flow of translating pages/articles.

I'll get back as soon as it has been sent to me and update this thread accordingly.

April 1, 2024 at 11:09 am #15468905

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Hello,

Sure. Thank you. I'll be waiting for your feedback. Have a lovely week!