Streaming live at 10am (PST)

Translate placeholder text with Google Translate


Hi there,

So I got a nice GTranslate widget on a site for a client of mine. But GTranslate is not translating the placeholder text of input fields. Who can help me with this?

I found this javascript code snippet. But i don’t know how to implement it on my website.

This is the read only link:

The page with the input fields that need to be translated is:

Who can help me with this?

Thanks in advance!


As preceding answer, google translator does no longer translate placeholders
whilst googling, located this javascript answer and it does paintings
jsfiddle in here
// find all placeholders
var placeholders = report.querySelectorAll(‘input[placeholder]’);

if (placeholders.period) {
// convert to array
placeholders =;

// reproduction placeholder textual content to a hidden div
var div = $('');

  var text = input.placeholder;
  div.append('' + textual content + '');    


// save the primary placeholder in a closure
var originalPH = placeholders[0].placeholder;

// check for adjustments and update as needed
  if (isTranslated()) {
    originalPH = placeholders[0].placeholder;
}, 500);

// hoisted ---------------------------
characteristic isTranslated() { // actual if the textual content has been translated
   var currentPH = $($('#placeholders > div')[0]).textual content();
   return !(originalPH == currentPH);

feature updatePlaceholders() {
  $('#placeholders > div').every(characteristic(i, div){
    placeholders[i].placeholder = $(div).textual content();


Also see this
best radr detector | Dolby atmos apk | TuTuApps | IPTV Kodi


hai friend,

i am using the above code for my google language translator plugin, to convert the placeholder into respective language but it throws some error. could you please send some references link regarding this example. Thanks in advance