JS | Widget title translations with "lang" GET parameter
Arnaud Masson
started a topic
about 1 year ago
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:
$('#companies.data('subtitle','Seleziona uno store');
Arnaud Masson
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:
To change subtitles: