Hi,
We use the Weglot plugin to translate our website from Portuguese to English. In our Privacy Policy button we want to change the link when the website is in english. But, according to the Weglot the only way to change the url link is through the code of the website. How can we access the code of our website?

Here is what Weglot said to change the link:
"When you need to translate an external link to redirect your visitors to a different website (depending on their languages), you could have the reflex to make some changes from the Translations List.
But you can't proceed this way.

To translate an external link, you'll have to follow these steps.

Create two different elements. By creating two different elements in your original website, you'll be able to define two different links. The first one will follow the second one. However, the two elements will never be displayed at the same time. For instance, two icons (one linked to an English URL and the other linked to a Spanish URL).
Then, you'll have to add a specific selector for each element. For example: .link-en for the icon linked to the English URL and .link-es for the icon linked to the Spanish URL.
After that, you'll have to use CSS rules to hide the element that doesn't match with the current language.
To do the last step, go to your WP Dashboard > Weglot > Override CSS and enter this code:

html[lang="es"] .link-en {

display: none!important;

}
html[lang="en"] .link-es {

display: none!important;

}
!! Don't forget to replace the right languages and the right classes in the code below. !!
!! Also, make sure the 'en' and 'es' abbreviation are the ones you're really using. !!

To find the language code of your original language, you have to go to your source code. The code is displayed at the top:

Then, if your original language is English, here the final code you'll have to use:

html[lang="es"] .link-en {
display: none!important;
}
html[lang="en-US"] .link-es {
display: none!important;
}
"

Thanks!

Hi, We use the Weglot plugin to translate our website from Portuguese to English. In our Privacy Policy button we want to change the link when the website is in english. But, according to the Weglot the only way to change the url link is through the code of the website. How can we access the code of our website? Here is what Weglot said to change the link: "When you need to translate an external link to redirect your visitors to a different website (depending on their languages), you could have the reflex to make some changes from the Translations List. But you can't proceed this way. To translate an external link, you'll have to follow these steps. Create two different elements. By creating two different elements in your original website, you'll be able to define two different links. The first one will follow the second one. However, the two elements will never be displayed at the same time. For instance, two icons (one linked to an English URL and the other linked to a Spanish URL). Then, you'll have to add a specific selector for each element. For example: .link-en for the icon linked to the English URL and .link-es for the icon linked to the Spanish URL. After that, you'll have to use CSS rules to hide the element that doesn't match with the current language. To do the last step, go to your WP Dashboard > Weglot > Override CSS and enter this code: html[lang="es"] .link-en { display: none!important; } html[lang="en"] .link-es { display: none!important; } !! Don't forget to replace the right languages and the right classes in the code below. !! !! Also, make sure the 'en' and 'es' abbreviation are the ones you're really using. !! To find the language code of your original language, you have to go to your source code. The code is displayed at the top: Then, if your original language is English, here the final code you'll have to use: html[lang="es"] .link-en { display: none!important; } html[lang="en-US"] .link-es { display: none!important; } " Thanks!