← Back to team overview

dhis2-devs team mailing list archive

Re: API for pulling Multilingual Labels?

 

I can see that you are thinking about the whole metadata model - nice.
All we seek to get back is the label on the current user locale, and we
only need Categories, Data Elements and Data Set Sections labels at this
stage.

Also, when you are in a custom form - how can you know what language is the
current user set to?
I imagine needing to add some extra text, which will need multiple
translations. We can embed such text on the HTML of the page, as long as we
know what's the current language, and then display accordingly.

R

*Rodolfo Meliá*
*Principal  |  *rmelia@xxxxxxxxxxxx
Skype: rod.melia  |  +44 777 576 4090  |  +1 708 872 7636
www.knowming.com


On Mon, Dec 9, 2013 at 6:47 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>wrote:

> Hi Rodolfo,
>
> will try to get this done for 2.14. Its a bit tricky - will have to ponder
> a bit how to solve it since it affects the whole api. I think we simply
> returns the regular objects translated depending on the currently
> authenticated user - no extra feature/resource.
>
> https://blueprints.launchpad.net/dhis2/+spec/i18n-in-web-api
>
> cheers
>
> Lars
>
>
>
> On Fri, Dec 6, 2013 at 5:45 PM, Rodolfo Melia <rmelia@xxxxxxxxxxxx> wrote:
>
>> Hi Morten. We just need the labels to be returned in the user language.
>> If James can do this, please assign it to him.
>>
>> Rodolfo Meliá
>> +44 777 576 4090 | +1 708 872-7636 <+1%20708%20872-7636>
>>
>> Please ignore any typos on this email sent from my mobile, probably
>> written while I was at the park with the kids, at the airport walking to
>> the gate, or sleepless (although exhausted). Grammatical faults? I'm sorry-
>> I do my best
>>
>> On 6 Dec 2013, at 15:35, Morten Olav Hansen <mortenoh@xxxxxxxxx> wrote:
>>
>> Hi Rodolfo,
>>
>> We already have a blueprint for this (for 2.14, but it has not been
>> assigned yet). You can see it at [1].
>>
>> Do you need multiple translation for a single user, or is it enough that
>> data-element names etc returned are in the users db-locale?
>>
>> [1] https://blueprints.launchpad.net/dhis2/+spec/i18n-in-web-api
>>
>>  --
>> Morten
>>
>>
>> On Fri, Dec 6, 2013 at 12:55 PM, Rodolfo Melia <rmelia@xxxxxxxxxxxx>wrote:
>>
>>> Hi - as part of some of the apps that we are coding, as well as 7
>>> complex custom forms that we are about to build (they will have some
>>> JScript for logic), we will need both (apps and forms) in 3 languages
>>> (total 21 forms if we use the current way of doing things).
>>>
>>> Does the current metadata API has a function to retrieve multilingual
>>> values?
>>> What we are looking is the possibility to retrieve the Name, Form Name
>>> or Short Name of a DataElement, Category or Option Set  in the current-user
>>> language by passing the UID or Code.
>>>
>>> If this functionality doesn't exist at the moment:
>>> - Should it be added to the metadata api?
>>> - Should it be part of the Categories/ Data Elements/ api?
>>>
>>> PSI will be happy to contribute on the development of this under your
>>> guidance.
>>>
>>> Rodolfo
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

Follow ups

References