Skip Navigation

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.

Tagged: 

This topic contains 11 replies, has 2 voices.

Last updated by Dražen Duvnjak 1 month, 1 week ago.

Assigned support staff: Dražen Duvnjak.

Author Posts
March 1, 2021 at 8:11 am

casperB-5

Links aren't translating while using memsource

March 1, 2021 at 8:46 am
March 2, 2021 at 8:37 am #8204681

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I have checked your issue and could see the problem on this page: hidden link.

For this case, I would suggest the next workaround:

Please add XML configuration and add URL from Divi button for translation. Go to WPML > Settings > Custom XML Configuration and add the following XML code:


<wpml-config>
<shortcodes>
    <shortcode>
        <tag>et_pb_button</tag>
        <attributes>
            <attribute>button_text</attribute>
            <attribute>button_url</attribute>
        </attributes>
    </shortcode>
</shortcodes>  
</wpml-config>

Source: https://wpml.org/forums/topic/divi-buttons-link-doesnt-have-dedicated-field-in-the-translation-editor/

This way URL will be included in the XLIFF file/translation with its own field and you can translate it and add translated URL, per your wishes.

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

Regards,
Drazen

March 2, 2021 at 8:57 am #8204995

casperB-5

Hi Drazen

I actually followed your guide about Divi and WPML and added all of the code, you guys suggest in one of your guides (I've added it below). As I told your colleague in the chat it works fine when I use WPML's own Advanced Builder. The problem is when the translation is imported from Memsource, then it doesn't work. My suggestion would be that the Memsource integration doesn't read the Custom XML, but I'm no expert at all.

[deleted]

March 2, 2021 at 10:10 am #8205937

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

I have deleted the shared XML config, this is actually the default Divi XML config for WPML, and you do not need to add it again, it should be loaded automatically.

In this default XML, Divi button URL is not added for translation, and it should be translated automatically as it does with ATE, but I see in Memsource documentation they work a bit differently and you need to add shortcodes and attributes that are going to be translated.

So, I have deleted mentioned XML, and have added Divi button URL for translation via XML config, then also added in memsource settings this shortcode for translation.

I have tried downloading XLIFF and it looks fine to me, but I can not confirm this without testing on Memsource. Can you please try with the test page:

- hidden link
- hidden link

Related documentation and troubleshooting section:
- hidden link

Please let me know how it goes and if you still have an issue.

Thanks and kind regards,
Drazen

March 2, 2021 at 1:38 pm #8208445

casperB-5

Hi Drazen

I just got the translator to do a test, and here's what he replied:

hidden link

1. Inline Link (segment # 7 in the editor – green)

Just what we had before:

This is presented (properly) as a markup placeholder (in most projects, you don’t want the translator to edit a link).

On upload (without me doing anything), this is corrected to the respective Polish page. Perfect.

2. Button link (segment # 11 in the editor – red)

… is presented as editable text.

This is unusual, but probably manageable on our side (although it means more work).

However, it seems this is not a link that WPML will “see” and adapt.

I changed it to “hidden link (same as the inline link), hoping WPML would do is thing, but it didn’t.

So that’s better than nothing, but it would come down to translators manually adjusting links = not a great idea.

Unfortunately, the two others (image and row) still aren’t there.

------

Right now the only XML you've added was for the buttons, right? We're also working with links from images and from columns, so we need the XML to cover that as well.

March 3, 2021 at 8:35 am #8214073

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

That is good to know, but since it happens with other elements also, it might not be the best way to include all elements and translate links for all of them manually. (I have removed XML config for button)

I have checked this further and it seems this issue specific to Memsource, for example, I have done the next steps:

- Create a new page with a Divi button link
- Send for translation
- Download XLIFF
- Translate only button text
- Upload translated XLIFF
- Translated link is automatically converted to the correct one

Link: hidden link

So it seems the issue is specific to that page you are using to test or memsource.

1) Can you please follow the next steps and let me know how it goes:

- Create a new page with a Divi button and add a link
- Send for translation
- Download the XLIFF file before translation and share it with me
- Share translated XLIFF file with me

2) Share with me how is Memsource receiving a file for translation, directly from WPML or they are getting an XLIFF file and returning translated XLIFF?

3) Is there a way for me to check the same procedure and reproduce the issue? Maybe log in to Memsource online tool if you are using that approach?

Please let me know.

Thanks and kind regards,
Drazen

March 4, 2021 at 8:08 am #8224821

casperB-5

Hi Drazen

1) The XLIFF file can be downloaded here: hidden link - it's made from this page: hidden link

2 &3) My translator is saying, that it sounds like you're not aware how WPML / Memsource works (in regards to 2 & 3). He wants you to take a look her, as it might clarify how these two systems works together:

hidden link
https://wordpress.org/plugins/memsource-connector/

He also says:
To be honest, I think it wouldn’t be asking too much that WPML (Devs or Support) set up a test system for dealing with one of the most popular web-based translation management systems in the world (memsource). But that’s just me.

March 4, 2021 at 8:12 am #8224849

casperB-5

I'm btw. gonna provide you with the problem description from the translator, just to ensure that you're fully aware of the situation:

Brief problem description:

When accessing and returning pages from a (WordPress + DIVI + WPML) website using the Memsource plug-in and Connector, hyperlinks created around images and rows using the DIVI Builder are not localized. We cannot pinpoint / fix the problem, which seems to occur “between” WPML and Memsource – it does not occur when using WPML’s Advanced Editor.

Long description:

First let me apologize for the really verbose text below. You may actually require even MORE information. And if it helps, I can make myself (and/or the client’s web developer) available for a phone call or Zoom session.

This issue may also require a Memsource Support Specialist logging into the client’s site / WordPress dashboard and/or working with WPML Development & Support.

1. Project:

Translation of website for Danish hi-fi company SL Audio with the following URLs (two brands):

hidden link
hidden link

We are currently doing a full “baseline translation” of all pages on these sites to multiple target languages (Polish and Chinese, with more languages planned). Later, we want to do fully automated translation updates using Memsource Project Automation.

1.1 Client site technology stack:

– WordPress version 4.8.2
– DIVI Theme
– WPML (current version)
– Memsource plug-in (current version)

(You can scan for other plug-ins on their site, or I can ask them if it’s relevant.)

2. What works:

– Using WPML, the Memsource WordPress plug-in and Memsource Connector on my side, we can access and browse the site’s posts and pages.

– All segment-level content (including in-segment hyperlinks) is extracted properly and translatable.

– The in-segment links on these pages go to page IDs (for example: <a href="/?p=4804">. After upload from Memsource, these links are automatically adjusted (as I understand, by WPML) to the respective translated version of said page (so they’ll go e.g. to the URL with “lang=pl” appended for Polish).

3. What doesn’t work:

– The DIVI theme as used on this site allows links around stand-alone images as blocks. When a page is translated using WordPress and the WPML Advanced editor, these “wrapper” links are correctly localized.

– HOWEVER, WHEN WE PULL THE SAME PAGE INTO MEMSOURCE WEB FOR TRANSLATION AND RE-UPLOAD THEM USING “EXPORT TO ONLINE REPOSITORY”, THESE “BLOCK-LEVEL” LINKS AREN’T UPDATED. THEY ARE ALSO NOT EXPOSED AS TAG PLACEHOLDERS TO THE TRANSLATOR.

This means we see localized published pages with many links still going back to the source (English) site, which seriously affects user experience. And there are simply too many of these links to fix them manually after publishing.

(Such manual post-editing would also make – Memsource-based – automation impossible.)

3.1 Example 1

– English “Electronic products” overview page on client site:
hidden link

– Polish “Electronic products” overview page (translated using Memsource Web) on client site:
hidden link

– Page in Memsource Editor:
hidden link

The text is translated, but the links around the images still go to the respective English pages, sending a user away who wants to navigate the localized site.

As you can see when expanding the tag placeholders in Memsource Editor, there are “<!-- end:tag base64:false -->” placeholders here, but no links.

3.2 Example 2 (test page with four links: button, inline, image, row)

– English test page on client site:
hidden link

– Polish test page (translated using Memsource Web) on client site:
hidden link

– Test page in Memsource Editor:
hidden link

4. Our situation

While in general, the technology chain (WordPress + DIVI + WPML + Memsource plug-in <> Memsource Connector) is working, we are stuck with page elements that are

- “seen” and localized properly when translated in WPML directly, but

- discarded when the same page is translated using Memsource.

2 (1).png
1 (2).png
3.png
March 4, 2021 at 2:41 pm #8229101

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

hello,

thanks for getting back and sharing quite an informaive reply.

You are right, I am not quite familiar with Memsource, and thanks for sharing documentation, screenshots, and details, it is helpful.

I have forward all of this to our 2nd tier support to check and advise further.

I will update you soon.

Thanks and kind regards,
Drazen

March 5, 2021 at 2:54 pm #8237611

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

our 2nd tier checked on these issues and I am sharing an update on this issue.

It seems memsource and connector plugin used is not officially compatible with WPML nor tested by our side as you can check on the next link (https://wpml.org/plugin/).

What we can do from our side, is provide a workaround for your troubles, but I would suggest contacting memsource and plugin authors to suggest an easy fix and if they need our help, they join our compatibility program and we will be glad to help and make it officially compatible with WPML.

The reason, why links work correctly with another translation method, is because ATE/TE/XLIFF uses the Translation editor module to translate the page which is not the case of memsoruce. Memsoruce directly inserts the post in DB so WPML has no control over it.

I suggest the next 2 steps:

1) Contact memsource for additional suggestions and help.

2) Use the workaround method and add links for manual translation via WPML / Memsource settings.

I have added it already for you for image, button, and column. Please check the next documentation for more info on how to add it for more elements:

- https://wpml.org/documentation/support/language-configuration-files/#page-builder-content
- hidden link (Jump to Troubleshooting section)

Let me know how it goes.

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

Regards,
Drazen

March 11, 2021 at 8:56 am #8281689

casperB-5

Hi Drazen.

Thanks for all testing and problem solving. I'm just gonna answer this straight out of the box.

This might be the worst support, I've ever experienced (or at least among the worst). I'm glad the you tried to fix it, but you left the website in a total mess. Dozens of plugins unpublished and a number of settings destroying the translations. You cold at least have
- Reactivated the plugins after you did the troubleshooting
- Maybe listed what changed you did, so I would know ehre to look - and maybe just see if the changes actually worked. Our translator ended up with a file full of code, which were converted to text upon upload.

Just to sum up the support left our WPML/Memsource integration in a worse state than before we started.

I hope that you would learn to document your changes for the future, so your clients (me), have insights in what you've done.

March 11, 2021 at 9:15 am #8281965

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I am very sorry for this experience and the trouble caused, it was not my intent.

1) You are right, I haven't enabled back the plugins on the staging site, and I am sorry for that, I wasn't aware it will cause issues and you are working on the site.

2) Only changes I have done are removing/adding XML configuration for WPML (WPML >Settings >Custom XML Configuration) and inside Memsource settings, plus creating few test pages.

For example, added WPML XML code for button link, shared few replies above, to WPML > Settings > Custom XML Configuration, and then add same attribute/tag to Memsource > Shortcodes ( et_pb_button > button_url).

I thought I made it very clear in my last reply and a few replies above, also shared documentation for both processes for WPML and Memsource > Shortcodes.

I am sorry I haven't made my steps more clear, if I can do anything else to clear things up please let me know.

Kind regards,
Drazen