startTranslate() example (Scf)
In this example, a page-local translation is called using client-side script. This way, you can easily call server-side logic and work with the results in the client.
Smartsite SXML | Copy Code |
---|---|
<se:pagetranslations id="helpers"> <se:collection> <se:member name="hello()" trim="both"> Hello {translation.arg(who)}! </se:member> </se:collection> </se:pagetranslations> <se:placeholder.addjavascriptonload> var cb = function(s){ alert(s); } $j.scf.sys.startTranslate('translation.helpers.hello', cb, {who: 'world'}); </se:placeholder.addjavascriptonload> |