Jump to content
riconegri

Simple way to translate your prestashop theme

Recommended Posts

On page translations of Prestashop in Chrome, you translate the page to the desired language, and runs the script below in the console

 

jQuery('tbody tr').each(function(i){
 var vau = jQuery(this).find('input').val() || jQuery(this).find('textarea').val();
 if(!vau){
jQuery(this).find('input').val(jQuery(this).find('td').eq(0).text());
jQuery(this).find('textarea').val(jQuery(this).find('td').eq(0).text());
//console.log(jQuery(this).find('td').eq(0).text());
 }
});

 

 

 

The translated terms of the browser, were transferred to the fields, so now it's just correct, and save your translation.

Remember, symbols are wrongly translated, so remember to pass the translation, and change, for exemple, the '% d' to '% d' ..., remove a blank ..., or improve script...

 

Thanks...

post-552935-0-83280600-1376326761_thumb.jpg

post-552935-0-06158300-1376326774_thumb.jpg

post-552935-0-85883800-1376326786_thumb.jpg

Edited by riconegri (see edit history)
  • Like 5

Share this post


Link to post
Share on other sites

Hola, ojalá me pudieran ayudar. Al ingresar el código:

 

jQuery('tbody tr').each(function(i){
  var vau = jQuery(this).find('input').val() || jQuery(this).find('textarea').val();
  if(!vau){
jQuery(this).find('input').val(jQuery(this).find('td').eq(0).text());
jQuery(this).find('textarea').val(jQuery(this).find('td').eq(0).text());
//console.log(jQuery(this).find('td').eq(0).text());
  }
});

 

 
Me sale el siguiente error en la consola y no cambia nada
 
 
VM2419:1 Uncaught ReferenceError: jQuery is not defined(…)(anonymous function) @ VM2419:1
 
 
Que creen que pueda ser que hago mal?
 
De antemano muchas gracias!

Share this post


Link to post
Share on other sites

On page translations of Prestashop in Chrome, you translate the page to the desired language, and runs the script below in the console

 

 

jQuery('tbody tr').each(function(i){
var vau = jQuery(this).find('input').val() || jQuery(this).find('textarea').val();
if(!vau){
jQuery(this).find('input').val(jQuery(this).find('td').eq(0).text());
jQuery(this).find('textarea').val(jQuery(this).find('td').eq(0).text());
//console.log(jQuery(this).find('td').eq(0).text());
}
});

 

 

The translated terms of the browser, were transferred to the fields, so now it's just correct, and save your translation.

Remember, symbols are wrongly translated, so remember to pass the translation, and change, for exemple, the '% d' to '% d' ..., remove a blank ..., or improve script...

 

Thanks...

 

amazing, everyone should know this!!!!! you saved me tons of hours!!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More