Skip Navigation

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

Problem:
You are using WPML with the Astra theme and have added two CTA buttons in the header. While you can translate the text of these buttons, you are unable to localize the URLs for different languages, with all languages pointing to the same URL.
Solution:
To localize the URLs for each language, follow these steps:
1. Navigate to WPML-> Theme and plugins localization, select your theme/plugin, and scan.
2. Go to WPML-> String Translation.
3. Scroll down and click on the "Translate texts in admin screens »" link.
4. Search for the needed strings.
5. Select the strings.
6. Click on the "Add to String Translation" button.
7. Then click on the "« Return to String Translation" link.
8. Translate the strings, clear the cache, and check the front end.
For more detailed guidance, please refer to our guide on translating texts in the admin texts screen: Translating texts in admin screens.

If this solution does not apply to your case, or if it seems outdated, 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 you still need assistance, please open a new support ticket at WPML support forum.

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

Last updated by Osama Mersal 1 year ago.

Assisted by: Osama Mersal.

Author Posts
May 19, 2024 at 7:39 am #15642376

marnickS

I am using WPML to make my website, localhagiang.com, multilingual while using the Astra theme. I have utilized the header builder in Astra to add two CTA buttons in my header.

Although I can successfully translate the text of these CTA buttons using WPML's String Translation feature, I am unable to localize the URLs.

Currently, all languages point to the same URL (e.g., /tours/), but I need them to point to their respective localized URLs (e.g., /es/tours/ for Spanish, /de/tours/ for German). Could you provide guidance on how to achieve this URL localization for each language?

May 19, 2024 at 9:09 am #15642429

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Please try the following steps:

1- Go to WPML-> Theme and plugins localization, select your theme/plugin, and scan
2- Go to WPML-> String Translation
3- Scroll down and click on the "Translate texts in admin screens »" link
4- Search for the needed strings
5- Select the strings
6- Click on the "Add to String Translation" button
7- Then click on the "« Return to String Translation" link
8- Translate the strings, clear the cache, and check the front end

Kindly check our guide to know more about translating texts in the admin texts screen. (https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/)

Best regards,
Osama

May 20, 2024 at 3:19 am #15643364

marnickS

Thank you Osama, I found the place where I can change the link for each language.