← Back to team overview

dhis2-users team mailing list archive

Re: Two translation questions ...

 

Hi David

Translations have their own endpoint at /api/translations

If you simply want to export all translations from one system and import
into another, you could do something like:
GET /api/translations.json?paging=false&fields=:owner > t.json

Then you could just POST this into your second instance (using endpoint
/api/translations)

Using the output as a template, you can easily see how to create your own
translations externally and then import them.

--
Morten

On Mon, Dec 14, 2015 at 8:45 AM, David Hagan <david.hagan@xxxxxxxxxxxxx>
wrote:

> Morning all,
>
> I have two related questions:
>
>    - I know that in the later builds of DHIS2 one can 'extract' the
>    translated metadata via the API using the 'locale' argument. Is there an
>    easy way to extract translations from one instance and then import
>    translations for existing objects using this new ability (the current
>    approach I'm using is to extract from the translation table and 'Curl' the
>    resulting file into the target system)?
>    - Is there an easy way to prepare and import long lists of metadata in
>    multiple languages (e.g. we have thousands of facilities in Arabic and
>    English, or in another case, hundreds of option-set values in Russian,
>    Ukrainian and English? We've imported the initial list using the base
>    language, but now want to import the other two languages.
>
> Any other hints, shortcuts etc. appreciated.
>
> David
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References