Currently UUF doesn't support i18n in client-side.

@UUF Team,
We need to come up with a solution for client-side i18n. Shall we start a
discussion on this?

Thanks.

On Thu, Mar 23, 2017 at 4:36 PM, Prasanna Dangalla <[email protected]>
wrote:

> Hi Sajith,
>
> This is for Client-side JS
>
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> On Thu, Mar 23, 2017 at 2:54 PM, SajithAR Ariyarathna <[email protected]>
> wrote:
>
>> Hi Prasanna,
>>
>> Is there a mechanism defined to use something like i18n in javascript ?
>>
>> Server-side JS or Client-side JS?
>>
>> On Thu, Mar 23, 2017 at 11:02 AM, Ayesha Dissanayaka <[email protected]>
>> wrote:
>>
>>> Hi Prasanna,
>>>
>>> Similar discussion was started sometime back in [1].
>>> Issues in [2], [3] have some suggestions.
>>>
>>> [1] [Dev][UUF][IS-6] Enable i18n support in javascript
>>> [2] https://github.com/wso2/carbon-uuf/issues/160
>>> [3] https://github.com/wso2/carbon-uuf/issues/166
>>>
>>> @Ayesha: As I understood all these are done for server side JS, I'm
> wondering about client side JS.
>
>
>>
>>> On Thu, Mar 23, 2017 at 10:46 AM, Pubudu Gunatilaka <[email protected]>
>>> wrote:
>>>
>>>> Adding Manu and Sajith.
>>>>
>>>> On Thu, Mar 23, 2017 at 10:44 AM, Prasanna Dangalla <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Nisala,
>>>>>
>>>>> I was wondering how to include this in javascript files, not in hbs
>>>>> files. Is there a way to include in javascrip fiels ?
>>>>>
>>>>> Thanks
>>>>>
>>>>> *Prasanna Dangalla*
>>>>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>>>>> lean.enterprise.middleware
>>>>>
>>>>>
>>>>> *cell: +94 718 11 27 51*
>>>>> *twitter: @prasa77*
>>>>>
>>>>> On Thu, Mar 23, 2017 at 10:33 AM, Nisala Nanayakkara <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> 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/ind
>>>>>> ex.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_U
>>>>>> S.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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Pubudu Gunatilaka*
>>>> Committer and PMC Member - Apache Stratos
>>>> Software Engineer
>>>> WSO2, Inc.: http://wso2.com
>>>> mobile : +94774078049 <%2B94772207163>
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Ayesha Dissanayaka*
>>> Senior 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, Palm grove Avenue, Colombo 3
>>> E-Mail: [email protected] <[email protected]>
>>>
>>
>>
>>
>> --
>> Sajith Janaprasad Ariyarathna
>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>> <https://wso2.com/signature>
>>
>
>


-- 
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