As far as I can tell, you can use the object dictionary as a parameter for your template.
/**
* @param dict
*/
{template .example}
<h1>{$dict.title}</h1>
<div>{$dict.content}</div>
{/template}
This object can be generated on the server side from your locale file and transferred to javascript via the script tag.
Otherwise, you can upload another file of the compiled template to the client side in accordance with the locale.
i18n , , imo.