Hello @josep,
Welcome onboard the community,
Use this code it will easily translate any countries on the countries list for you:
<script>
$(function() {
let CountriesToTranslate = [
{name:"CA", translation:"Canadá"},
{name:"ES", translation:"España"},
// Add new countries after this...
];
for (let i = 0; i < CountriesToTranslate.length; i++) {
let country = CountriesToTranslate[i];
$(`[name="shipping_country"] option[value="${country.name}"], [name="country"] option[value="${country.name}"]`).text(`${country.translation}`);
}
});
</script>
Step 1: Copy the code above into your Clickfunnels’ step
Make sure the code is copied into the page’s Tracking code > Footer Code box.
Step 2: Change CountriesToTranslate
array
By removing those two entries or adding new ones if you wish, you can add new entries (country translations) by appending this line:
{name:"A", translation:"B"},
After the "// Add new countries after this..."
, the comma ‘,’ is part of the line.
Replace A with the ISO-2 country code, and replace B with the translation you want to be shown instead.
Step 3: Save changes!
Save your changes and try it out…
Tag me if you face any problems with the code above or have any questions…