Work on internationalizing Bahmni for Arabic and other right-to-left languages


(Abdelrahman Hosny) #1

We are implementing Arabic localization, and we could spot two folders where we needed to add locale files to:

  1. In bahmniapps, /opt/bahmni-web/etc/bahmniapps/i18n
  2. In bahmni configs, /opt/bahmni-web/etc/bahmni_config/openmrs/i18n

This assumes we are directly manipulating the production build of Bahmni. We could alternatively add the localization in a forked version of these repos.


Bahmni Config: How to provide multiple locale files per app
(Darius Jazayeri) #2

@ahosny am I correct in understanding that you’re undertaking the project of localizing Bahmni into Arabic? Can I break this out into a separate discussion topic?

Assuming that’s the case, we definitely would want to see this get incorporated into the main Bahmni product. So, when you do make changes to bahmniapps, please do this in a fork and send a pull request for it.

Translating the messages themselves should be done through the online Transifex tool, not directly in the codebase. See Translating Bahmni and Step 3 of Product Internationalization on the wiki.

But I expect you will also need to make some styling and layout changes in the html and css, so I expect these changes would happen in the code in https://github.com/Bahmni/openmrs-module-bahmniapps.


(Abdelrahman Hosny) #3

@darius Yes. I was planning to bring the discussion in this thread back to life.

What we are doing right now, is we are getting ourselves familiar with the code base of Bahmni, trying to figure out the correct places to put things. We are hosting a development version on https://bahmni.xware.co/

I would like to share some progress on what it may take to complete the styling part (HTML/CSS). Should we create a new discussion topic or continue on the one mentioned above?


(Darius Jazayeri) #4

I moved these posts to a new topic. Let’s continue the discussion here. (This is the new topic.)


(Ghada Elmasry) #5

We need to translate some of the concepts in OpenMRS in order for them to appear correctly on Bahmni interface. We have added the localization to OpenMRS and they appear on the adminstration of OpenMRS correctly .

Now, we have a problem . They don’t get translated in the registration app as in this image.


(Dimitri R) #6

Hi @ghadaelmasry,

You should have a look at those two threads:

Let me know if this helps, and let’s take it from there.


(Ghada Elmasry) #7

Thanks, it works good with me.
I let en and arabic fully specified name be the same and change only arabic short name.

Now , we have another problem in clinical app arabic version as in these images.


(Angshuman Sarkar) #8

@ghadaelmasry, it will be good if you can showcase this in a call. We would like to understand besides the translation packs what all the other aspects did you have tackle, faced difficulties or found little or no-support.


(Dimitri R) #9

I remember that we came across the second error. This was due to some concepts for which the FSN wasn’t properly set for the target locale. In short, make sure that the ‘ar’ FSN always equals the ‘en’ FSN for each concept (so both will be the same English words). Don’t leave concepts with no ‘ar’ FSN set. This remark holds also for preexisting concepts shipped with Bahmni.


(Ghada Elmasry) #10

OK, but there is something I misunderstand. I leave concepts with no ‘ar’ FSN set and rebuild search index from administration of OpenMRS as in this image .

then the second error resolved as in image below. but it required rebuild search index every time i logged in bahmni .


(Dimitri R) #11

Ok so I looked in our in-house JIRA and we did not face the exact same issue as you.

It’s difficult to say from just the screenshots, you will have to debug the JavaScript to figure out what’s upsetting Bahmni. Are you in a position to do that?

Our experience with making Bahmni fully bilingual (which is more constraining than what you are currently undertaking) is that it’s mainly about this duplication of FSN across locales. Pay special attention to basic concepts such as WEIGHT and HEIGHT that are used in multiple places and are shipped with Bahmni with only the ‘en’ FSN set.


(Darius Jazayeri) #12

@ahosny, would you all be interested in showcasing your work so far on a call, and discussing next steps and ways forward?

I was just thinking about this work, and wondering what we can do to help carry it forward.


(Erik Grueter) #13

Hi Darius,

It looks like this work died? Our team is taking Arabic Translation back up and we would like to get it into master.

Can you provide the exact spots in the various projects where we need to Open Pull Requests?

Our team is going to add JSON files here.

If we do that do we still need to use Transifex? Do you want us to add both? Please specify…

Are the language selection dropdown values added in the code on Github? If so, where?

Thanks, Erik


(Erik Grueter) #14

@darius @angshuonline I can be reached most quickly at erikgrueter@gmail.com and look forward to hearing back.


(Darius Jazayeri) #15

Sorry for the slow reply. See the links in the second post in this thread: Work on internationalizing Bahmni for Arabic and other right-to-left languages

You’re supposed to do the translations in transifex.


(Andrew Kanter) #16

CIEL currently does not have any Arabic concept translations. I would love to get some in there if you are willing to contribute them back (mapped to CIEL concept ID or english term). Thanks!