Using API to get translated collections

Hi,

Hope all are well.

I’m trying to get translations of some things through the API. Items and associated collections. In the example below, the api returns translated dataElement displayName but not translations of the associated collections (dataElementGroup displayName):

api/dataElements.json?fields=:id,displayName,dataElementGroups[id,displayName]&locale=es

Wondering if this is a limitation with the API or an issue with the format of the request? The developer manuals don’t offer any examples on translations.

Cheers

Craig

Hi Craig,

you are correct and this is a know limitation.

We are working on re-factoring our db translation framework for version 2.24, which will enable us to support translating the object “graph”.

https://blueprints.launchpad.net/dhis2/+spec/translation-domain-object-associations

Sorry for that.

regards,

Lars

···

On Thu, Apr 28, 2016 at 3:55 PM, Craig Hollingsworth craig.hollingsworth@nrc.no wrote:

Hi,

Hope all are well.

I’m trying to get translations of some things through the API. Items and associated collections. In the example below, the api returns translated dataElement displayName but not translations of the associated collections (dataElementGroup displayName):

api/dataElements.json?fields=:id,displayName,dataElementGroups[id,displayName]&locale=es

Wondering if this is a limitation with the API or an issue with the format of the request? The developer manuals don’t offer any examples on translations.

Cheers

Craig


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org