How to upload a language not supported currently by DHIS2

Hello all,
So i need to translate the data elements and attributes into a local language that is currently not within the languages supported by DHIS 2, how to upload that language since it exists within google translate !!!

Hi @Haliz.t

Please what is the language so that the team can add it to Transifex? (Tagging @Matthieu for assistance)

You can read more about translation of dhis2 software (Localization of DHIS2 - DHIS2 Documentation)

And to get straight into action:

  1. Email the DHIS 2 team at translate@dhis2.org to request access.
    Please provide: - the name, email address and translation language of the user(s) you would like us to give access to, and - a little bit of information about why you are interested in contributing to the DHIS 2 translations

Thanks!

Hello @Gassim , My mother tongue language is Kurdish … in google translation we have both dialect (Sorani and Kirmanci) and since we use both i was wondering if possible to add them … we do use arabic too and arabic is already exist in the system .

1 Like

Thanks @Gassim for tagging me :+1:

Hi @Haliz.t. Thanks for your request. In Transifex, where we handle our translation work, we currently have Central Kurdish (ckb) as a translation language. On top of this, we could add: Kurdish (ku), Kurdish Iraq (ku_IQ) and Southern Kurdish (sdh). Sorry for my question, but would any of these correspond to Sorani and/or Kimanci?

1 Like

Hi @Matthieu , thanks a lot for replying and as usual much appreciation to @Gassim for all the support.
I believe using Kurdish (ckb) will be sufficient since unfortunately the dialect Badini is not supported yet.
Thanks a lot in advance,

2 Likes

Dear @Haliz.t, let me coordinate with the dev team to add Central Kurdish (ckd) to the Translations app in DHIS2.

Keeping you posted.

1 Like

Dear @Haliz.t - Could tell us which version of DHIS2 you are currently using and want to translate data elements and attributes in? Thanks in advance

1 Like

Dear @Matthieu much much appreciate your support … I tried Kurdish central that is currently supported by dhis2 it is only offered for interface not for the database, However the translation isn’t as I hoped it’s not very correct … so if it’s possible to use the same Kurdish sorani that is used in google translate that would be perfect.

And I am using dhis2 version 2.38.1.1

Thanks a lot

2 Likes

Hi @Haliz.t

The UI and DB localisations are handled independently in DHIS2.

For the UI we have a hardcoded set of languages. The community can contribute improvements to specific languages in the Transifex platform (follow the link in the first response).

For the DB the situation is a bit different. There are a few default locales, but you can easily add your own. There are some limitations to what you can add, but you can also get around that.
You can add your own DB locale by going to MaintenanceLocales (you’ll need to be a superuser). The limitation is that you must give a language and a country, and the name will be auto-generated, but there is a workaround you can use to change it to whatever you like, which I will explain below. Once you have added the locale you want you will need to add the translations yourself. You can do that through the Translations App, but it might be quite slow. I understand you would like to use google translate. To do that will require pulling the translations out of your DHIS2 instance (via the API), translating them somewhere (such as a spreadsheet), and pushing the translations back (via the API again). If you need help with this reach out to me and I might be able to support you, but you will need to do some work to get the translations :wink:

I hope that helps.

Kind regards,
Phil


Workaround to control the name and code of a locale (required running SQL directly on the DB):

Let’s say you want to create a language ku and want it to be displayed as Kurdish Sorani. (It is not possible to create this directly through the Maintenance App):

  1. Create a DB locale. It doesn’t matter what it is called, or even what language, as only the id of the locale will be used by the system. In fact, you can even use an existing language that is of no use to you.

  2. Modify the locale from step 1. I’m going to give the example that I didn’t create a new one, and instead want to replace the “Norwegian” locale.

    a. First I want to get the id of my chosen locale:

    select * from i18nLocale where locale = 'no';
     i18nlocaleid |     uid     | code |         created         |       lastupdated       | locale |   name    | lastupdatedby 
    --------------+-------------+------+-------------------------+-------------------------+--------+-----------+---------------
            52296 | oBMTTQceViV |      | 2013-11-18 13:00:43.837 | 2013-11-18 13:00:43.837 | no     | Norwegian |              
    (1 row)
    
    

    now I have the id = oBMTTQceViV

    b. Now I can change that locale to the one I want:

    UPDATE i18nLocale SET locale = 'ku' WHERE i18nLocale.uid = 'oBMTTQceViV';
    UPDATE i18nLocale SET name = 'Kurdish Sorani' WHERE i18nLocale.uid = 'oBMTTQceViV';
    
    

    note that I used the id I got previously in 2a.

Now I have a locale called ku which will be visible as Kurdish Sorani in the DB locale selection in DHIS2.

2 Likes

Thanks for this detailed explanation @phil :100:

1 Like

@phil Hello …am really grateful for your explanation … though as a matter of fact i am not a programmer and i don’t know how to write SQL queries … so am afraid i would need an extra hand which i hope one would have some time to get me through it … but thanks a lot.

1 Like