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.
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".
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)
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.
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.
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?
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.
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.
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.
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.