2
There are several ways you might accomplish this, depending on the exact requirements.
Here is an example from XOOPS 2.5.9, where the image manager code sets up to use the fine-uploader javascript. To do this, we used javascript in a script tag in a Smarty template to initialize the library code, passing in all the required language constants. In the template we can use the language constants as normal -- Smarty will do the substitution in the script code just like it will in HTML.
See the code here, on GitHub:
https://github.com/geekwright/XoopsCore25/blob/master/htdocs/modules/system/templates/system_imagemanager2.tpl#L52