Start a new topic

JS | Widget title translations with "lang" GET parameter

Widget titles can be customized. If you need to adapt your widget titles to multiple languages, you can use a custom JavaScript code.

Here is an example: 

$( document ).ready(function(){
var lang =$('#lang').val();
if(lang =='it'){
    $('#companies').data('title','Seleziona uno store');
}elseif(lang =='en'){
    $('#companies').data('title','Choose a store');
}elseif(lang =='sp'){
    $('#companies').data('title','Seleccione una tienda');}

To change subtitles: 

$(''subtitle','Seleziona uno store');

Login or Signup to post a comment