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

Last updated by Bruno Kos 4 months, 1 week ago.

Assigned support staff: Bruno Kos.

Author Posts
June 13, 2019 at 6:34 am

fredrikS-17

I have translated the site and it works great. I haven't paid much attention to the link or its structure. That just worked. If I am on an english page, the links go to english pages. And the same with swedish. But since yesterday when I open the WPML translation manager I can see the links, they are not translated so when I click that the string is translated it then points to the wrong language. If I leave it, it works, but then the page does not have 100% translations.

I hope I am making this easy to undertand. I have created a user for you to go in and look.

This page has some "untranslated" links:

hidden link

Those links works right now, but if I mark then as translated, they will become wrong.

Regards,
Fredrik

June 13, 2019 at 8:39 am #4010681

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

I have opened this page:
hidden link

And then opened its translation - it seems to me that all links are not properly translated in fact (they still point to originals), so I translated one of these links to try this and it seems to be working. Have a look at the images:
hidden link - when I am on this page, the chocolate tasting section now takes me to hidden link

Is that what you are trying to achieve?

Regards,
Bruno Kos

June 13, 2019 at 8:43 am #4010753

fredrikS-17

No, I know I can translate the links to get them to work. But I can't go through the site and translate hundreds off links? The links did not even show yesterday. I have never translated a link before, they just worked.

EDIT: Thansk for the reply by the way! Apprieciate our help 🙂

June 13, 2019 at 10:21 am #4011869

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

There are two ways to get there:
- one would be translating them manually (I know that this might be time consuming, but will be much faster than going to the whole escalating/debugging process if it proves to be needed)
- another method you should try is to use the following option:
-- WPML -> Settings -> Translate Link Targets -> Scan now and adjust links

This process will take a while though, depending on the number of strings you have on your site, so make sure to take a lunch or do something else in between :). Do not close the browser tab until the process is finished. There may be tens of thousands of strings WPML will scan and replace were needed.

Regards,
Bruno Kos

June 13, 2019 at 12:40 pm #4012931

fredrikS-17

But this does not make any sense. The links was not there before? Why should you even translate links anyway?

June 13, 2019 at 12:49 pm #4012987

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

The links was not there before? Why should you even translate links anyway?

Yes they were, but apparently translation management has not picked them before for some reason and hence they weren't registered in string translation and you did not see them in the translation management when translating the pages. It is hard for me to give an answer on when this occurred on your website - perhaps the theme has had XML configuration file updated which also included support for links.

But now that these elements are registered within the string translation, we need to translate them using one of the methods I suggested above. I have nothing else to reply to at this point apart from asking you to try these options :(.

As for translating the links - it really depends on the situation in which they are used, but many page builders allow you to translate links, because what if you plan to use external links in page builder and want to link translations to some other URLs perhaps?

Regards,
Bruno Kos

June 14, 2019 at 7:58 am #4019073

fredrikS-17

Hi again!
I am sorry, but I really don't get this. Here is my point of view.

1. I create a site in swedish.

2. I translate that site into english, page by page and post by post. Every time I have translated a page or a post 100% I can switch it between swedish and english. Beautifully.

3. When the complete site is translated every link works, I can navigate around on my site in both swedish and english and lever get transfered to the other language unless I switch. Everything is just great.

4. Then, as I have described, I suddenly get URLs and links in my translation manager. I have until this point never translated a link, anywhere. When I mark this link as "Complete" it starts to point to the wrong language. Of course, if I change the link manually to the english page, it works.

My big question here is, why do I have to translate links? If I am showing a post in english, click a link to another post or page, the WPML should point me to this post or page in the same language that I am on, right?

Right now, everytime I upate a post, I have to go thorugh ALL pages that link to this post and change the link. Manually. We talk 30-40 links sometimes. If I can find them.

You tell me that WMPL did not pick up these links in the translation manager before, but now it does. Why? I am sorry if I sound a little furstated but we have worked on this site for month, we are now live and can't edit the site because it breaks all the links.

It will be much appreciated to shead some light here, this must be a setting to turn off the translation of links?

Thanks for your support!
Fredrik

June 14, 2019 at 9:49 am #4020055

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Let me try to answer to the best of my ability 🙂

My big question here is, why do I have to translate links? If I am showing a post in english, click a link to another post or page, the WPML should point me to this post or page in the same language that I am on, right?

There is a difference between links in the content, which get picked up by string translation and between URLs in language switchers, that are used to switch the language when on a specific page.

Right now, everytime I upate a post, I have to go thorugh ALL pages that link to this post and change the link. Manually. We talk 30-40 links sometimes. If I can find them.

May I ask in which scenario you need to update them all? Are you talking about changing the URL, or? Because if you're doing this, I would definitely not suggest you to SEO and other considerations. There is a WPML Sticky Links plugin which would prevent this (when added into content):
https://wpml.org/download/wpml-sticky-links/?section=changelog
https://wpml.org/documentation/getting-started-guide/sticky-links/

You tell me that WMPL did not pick up these links in the translation manager before, but now it does.

I'm afraid I'm not able to answer this question, because I do not have a snapshot of your website before the changes happened, so I cannot compare to what happened in the meantime (was it the plugin, theme or some other upgrade).

It will be much appreciated to shead some light here, this must be a setting to turn off the translation of links?

In this particular scenario - these links in the post content being part of string translation, you could try deleting them from string translation table, but I'm not really sure what good or any change would this do and I wouldn't advise it.

But let me focus on this:

When I mark this link as "Complete" it starts to point to the wrong language. Of course, if I change the link manually to the english page, it works.

This is exactly what I did here:
hidden link

And the chocolate tasting read more button takes me to:
hidden link

I have translated it, marked it as complete and it is 100% saved. So you would have to do this only once for this page and never again. Can you tell me in which scenario this link would revert to the wrong one - the original that is?

Related to this - have you not tried this function yet?
-- WPML -> Settings -> Translate Link Targets -> Scan now and adjust links

Because this is exactly what this function should do when being run - it should update all the links to translations on all the pages where it has been used and registered through string translation, but if they get reverted to their originals for some reason, this is the issue we should focus on.

Regards,
Bruno Kos

The topic ‘[Closed] I suddenly need to translate links’ is closed to new replies.