Skip Navigation

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

Last updated by christianoD 1 year, 9 months ago.

Assigned support staff: Bobby.

Author Posts
April 8, 2019 at 10:31 pm


I am trying to: translate my client's site from Portuguese to French (it's a Brazilian hotel).

I try to translate all texts in the home page but the original text in Portuguese keeps appearing in some specific places (check the two last photos - one text is located together with the swimming pool photo and the other appears together with an aerial view photo).

It seems to be happening on the Contact page too (although I still don't have the translated texts, I already tested and noticed that it has the same issue).

Things that I need to translate but i don't know how:
• On the homepage, I also need to translate a custom code right below the slider... it's a box where the visitor can check for available dates.
• And I also need to translate three tripadvisor widgets that are located at the end of the home page.

Link to a page where the issue can be seen:
hidden link
hidden link

I expected to see:

Strangely, in the home page there seem to be some duplicated fields in the translation interface.

Instead, I got:

So, instead of the 5 main fields of text I can find 10.

April 8, 2019 at 11:39 pm #3561663


Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi There,

please go to WPML->String Translation -> and search for

 "A hospedagem na Pousada CASA Búzios tem como objetivo propiciar aos hóspedes a estadia numa casa de praia tipicamente buziana, da época de Brigitte Bardot, remetendo mentes e sentidos a tempos que não voltam mais."

afterwards you will see that its been picked up 3 different times , and there is one instance that is untranslated.

go ahead and add your translation there and click save. (there is greyed out content in it, just go ahead click in it the box and write your content in there or paste it in , it will work as expected)

let me know your results please and also try this with the rest of the strings

April 9, 2019 at 12:11 pm #3566559


Thanks, Bobby, it worked with the texts... now they are translated.

But there are still some pieces of custom code in the home page that need to be translated:
- The box at the top, through which the visitor check if there are rooms available;
- The three widgets at the end of the page.

I couldn't find them among the strings, they are not there, apparently.

April 9, 2019 at 4:43 pm #3569443


Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)


how are you currently adding these 2?

when i review the check in option i can see the code added from within the divi builder , and within it the strings are not wrapped in a gettext call which is most likely why they are not being picked up in String Translation.

as a test please try the following , go to the translation and open it with the divi builder instead of the Translation Editor (edit page -> use language switcher to switch to secondary language=> edit with divi builder) and edit the code within the divi builder for the secondary language and let me know your results please

April 18, 2019 at 10:38 am #3638337


Hi Bobby,

So... I managed to translate almost everything. Thanks...

The most important issue now is that I have this script integrating the website with a 3rd party booking system. A box where the visitor can input check-in and check-out dates and then click on the button that takes him to the booking system.

The script runs perfectly in the original language of the site, that is Portuguese. But the script just doesn't work in other languages.

I am aware that it's not possible to have the same script running in multiple places on the same page. So I suspect that for the same reason it's not possible to run the script in more than one language. I don't know how to solve this.

This is the script that I am using (followed by the html code).

$(function () {
dateFormat: "dd/mm/yy"
dateFormat: "dd/mm/yy"

function submitform() {
var dpd1 = $('#dpd1').val($('#dpd1').val().replace(/\//g, ''));
var dpd2 = $('#dpd2').val($('#dpd2').val().replace(/\//g, ''));

var q = $('#q');
var lang = $('#lang');
var ad = $('#ad');
var ch = $('#ch');
var code = $('#code');

var isMobileBrowser = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);

var url = isMobileBrowser ? 'hidden link' : 'hidden link'; + q.val() + '&lang=' + lang.val() + '&CheckIn=' + dpd1.val() + '&CheckOut=' + dpd2.val() + '&ad=' + ad.val() + '&ch=' + ch.val() + code.val(), 'Reserva');

<div id="be">
<h1>Ver disponibilidade</h1>
<form id="datepickerform" onsubmit="submitform()">
<!--Hotel ID-->
<input type="hidden" name="q" id="q" value="8465"/>

<input type="hidden" name="lang" id="lang" value="pt-PT"/>

<div class="row clearfix">
<!--Check In-->
<div class="columns">
<label class="label-check-in" for="dpd1">Check-in</label>
<input type="text" id="dpd1" name="CheckIn" class="date-selector" placeholder="Check-in"/>
<!--Check Out-->
<div class="columns">
<label class="label-check-in" for="dpd2">Check-Out</label>
<input type="text" id="dpd2" name="CheckOut" class="date-selector" placeholder="Check-Out"/>
<!--Submit Button-->
<div class="coluna-reserva">
<input type="submit" value="CLIQUE" name="submit" class="submit" id="submit" />



April 18, 2019 at 10:50 am #3638497


Bobby, sorry. I managed to solve it.
Thanks a lot for your help.
I will close this ticket... If I need to solve any additional issues I open a new one.

April 18, 2019 at 2:07 pm #3639831


My issue is resolved now. Thank you!