Hi @tuanphan, I am trying to solve the same issue as Natalie. I am making a multilingual site with Czech and English.
I inserted the code above into the Code Injection > Footer > Script:
/* TRANSLATE CTA BUTTON IN HEADER */
if (lang == "cs") {
$('a[href="/"]').attr("href", "/cs/vitejte/");
$('.btn').each(function() {
var text = $(this).text();
$(this).text(text.replace('Visit us', 'Navštivte nás'));
});
}
if (lang == "en") {
$('a[href="/"]').attr("href", "/en/welcome/");
$('.btn').each(function() {
var text = $(this).text();
$(this).text(text.replace('Navštivte nás', 'Visit us'));
});
But it still does not translate 😞 Any suggestions?