I have a javascript function in a wordpress script, I need it to be compatible with WPML chain translation
ubp_show_error("<p>Inutile de l'ajouter plusieurs fois</p>");
How can I make this chain to be something like this :
ubp_show_error(_e('<p>Inutile de l'ajouter plusieurs fois</p>','mytheme'));
I've tryed :
$error = _('<p>Inutile de l'ajouter plusieurs fois</p>','mytheme');
ubp_show_error($error);
but in javascript, this doesn't work