The way you have done in [1] is acceptable & correct. However in some
situations we need i18n support in the server-side JS (e.g. sending an
error 'sendError' with a message).
@Chandana, shall we create an issue for this?

We need to have i18n in the common foundation compoent's pages [3]. Please
create an issue for this.

[3]
https://github.com/wso2/carbon-uuf-common/tree/master/components/org.wso2.carbon.uuf.common.foundation.ui/src/main/pages/error

On Mon, Jan 23, 2017 at 8:23 PM, Ayesha Dissanayaka <[email protected]> wrote:

> Hi,
>
> Can we get a common method to support localization in javascript level,
> which can provide the functionality of 't' helper .
>
> One common use case is that we need to localize js generated messages such
> as errors.
>
> As a workaround I observe passing a key instead of the message.[1]
> But it will not work always when we need to populate a message with
> dynamic parameters.
>
> Further, uuf default pages should also support localization. ex:[2]
>
> [1] https://github.com/wso2/product-is/blob/6.0.x-C5/
> portal/apps/org.wso2.carbon.iam.user-portal.app/src/main/
> pages/login.js#L65
> [2] https://github.com/wso2/carbon-uuf/blob/master/
> samples/components/org.wso2.carbon.uuf.sample.foundation.
> ui/src/main/pages/error/default.hbs
>
> Thanks!
> -Ayesha
>
> --
> *Ayesha Dissanayaka*
> Software Engineer,
> WSO2, Inc : http://wso2.com
> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg>
> 20, Palmgrove Avenue, Colombo 3
> E-Mail: [email protected] <[email protected]>
>



-- 
Sajith Janaprasad Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/
<https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to