Skip Navigation

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

Problem:
The wrong URL is set for the button in English.
Solution:
Changed the URL to the correct one in WPML String Translations.
Relevant Documentation:

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

Last updated by Marsel Nikolli 1 year, 2 months ago.

Assisted by: Marsel Nikolli.

Author Posts
November 9, 2023 at 4:28 pm #14769965

martinP-99

Hi,

There is a button in my header that goes to a link.
Since the link is not the same from French to English, I used String localization to change it (see picture).

But it doesn't work, I always get the French link.

hidden link
Click on the header red button on the right (Request rate).

Thank you.

Traduction_de_chaînes_‹_Dimension_Transport_inc__—_WordPress.jpg
November 10, 2023 at 9:06 am #14773633

Marsel Nikolli

Hi,

Thank you for contacting WPML Support.

It would be helpful for me to better understand your situation if you could please tell me:

1) how are you adding that button to the header
2) how are you translating the header/menu (are you using any theme option/widget/etc.)

Thank you, looking forward to your reply.
Marsel

November 10, 2023 at 12:14 pm #14776239

martinP-99

Hi Marsel,

I found out that when I put my mouse over the button, I see the link in Safari on the left/bottom of the web page and it’s the right link, "hidden link.

But when I click it, something redirect that page to the French link, "hidden link".

Can't find out why.

1) The button is added with the Astra theme in its header setting.
2) Like I said in my first post, I used Localization String in WPML (see first post picture).

Note: I use French WP, so maybe my menus name translation of WPML is wrong in this post.

Thank you.

November 10, 2023 at 1:38 pm #14777105

Marsel Nikolli

I was able to check and see that there is a 301 redirection going on when you click on the:
hidden link (check the attached image)

Could you please try cleaning the cache of your website and see if that helps?

Let me know how it goes.
Marsel

redirect.PNG
November 10, 2023 at 2:05 pm #14777423

martinP-99

Hi @Marsel,

Yes, I cleared the cache and still redirecting. I have tried Google Chrome also, but same problem.
The plugin I use for the cache is "Redis Object Cache".

Anything else?

Thank you.

November 10, 2023 at 2:19 pm #14777579

martinP-99

I also have cleared the nginx cache on the Plesk backend.

Thank you.

November 10, 2023 at 3:51 pm #14778703

Marsel Nikolli

Please can you check on WP admin -> Appearance -> Menus that the menu is translated and check the URL for the red button on each translation is correct.

If you have any difficulties checking that part, I would require a temporary access on your WordPress admin page. I have set you next reply as private and you should be able to see a space where you can fill the login details.

Looking forward to your reply,
Marsel

November 10, 2023 at 4:15 pm #14778879

martinP-99

The menu is translated, but this button is not part of the menu.
It's a button added to the header section of the Astral personnalisation.
Just after the main menu.
See picture.

Personnalisez_Dimension_Transport_inc__–_ENSEMBLE__ON_FAIT_LA_DIFFÉRENCE.jpg
November 10, 2023 at 4:40 pm #14779251

Marsel Nikolli

I think we both might have missed a small detail, the correct English link should be:
hidden link

The actual URL for the button in English is:
hidden link

Correct links to set on the WPML -> String Translations should be:

French: hidden link
English: hidden link

Please change the stings and let me know if the issue still persists.

November 10, 2023 at 5:28 pm #14779587

martinP-99

Yes, thank.
What a beginner I look like!

The strange thing is that instead of an error 401. We were redirected to the French page.

Anyway thank you for your patience.