Hi Prasanna,
UUF has the capability of facilitating above mentioned scenario. You can
define your language property file under the ‘lang’ directory as follows.
|----src
| |----main
| |---- pages/
| |---- fragments/
| |---- layouts/
| |---- modules/
| |---- lang/
|----en_US.properties
| |---- public/
After that you can use following code segment to achieve your requirement
in your hbs file.
{{i18n "my.sample.key"}}
Please go through sample app available here[1] if you need more
clarification. Moreover you can find actual usage above code segment
here[2] and corresponding language file here[3].
[1] -
https://github.com/wso2/carbon-uuf/tree/master/samples/apps/org.wso2.carbon.uuf.sample.pets-store.app
[2] -
https://github.com/wso2/carbon-uuf/blob/master/samples/apps/org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages/index.hbs#L16
[3] -
https://github.com/wso2/carbon-uuf/blob/master/samples/apps/org.wso2.carbon.uuf.sample.pets-store.app/src/main/lang/en_US.properties
Thanks,
Nisala
On Thu, Mar 23, 2017 at 9:01 AM, Prasanna Dangalla <[email protected]>
wrote:
> Hi Devs,
>
> Is there a mechanism defined to use something like i18n in javascript ?
> Does the UUF has the capability of facilitating this ? You inputs are
> highly appreciated.
>
> Thanks
>
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
*Nisala Niroshana Nanayakkara,*
Software Engineer
Mobile:(+94)717600022
WSO2 Inc., http://wso2.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev