UI BUILDER: How to translate an Alert inside a client script

fabrizio95360
Tera Expert

Hi developers,  how can I translate the content of my alert depending on a user language?

fabrizio95360_1-1711126726398.png

 

Thanks in advance, Fabrizio

1 REPLY 1

Neel Patel
Giga Guru

Hi Fab,

 

Probably define a variable before the function and pass that variable in the function.

 

var myalert = "";

If(user.lang == "en"){
myalert = "This is english alert";
}
else{
myalert="My french is terrible";
}