As part of one of the Bahmni implementation, we need to support i18n for Bahmni out of box reports. Currently, all the headers are hardcoded in java file.
Solution what we thought
Pass the expected locale from Bahmni apps side
Get the locale from request and use spring message source to translate hardcoded headers
So we have been doing this for a while in one of our implementations, as in your point 1: syncing the user locale between Bahmni Apps and OpenMRS. Look at this commit.
I have been willing to do a PR for this for a long time (actually it got delayed recently because release .90 came in the way), but it requires an upgrade of REST WS to 2.20.0 (see RESTWS-660).
@sumanmaity112 actually, sorry this is already merged in (here). What wasn’t done is the upgrade of REST WS because it was too tight with the release process coming in the way.
So regarding your point 1, the only thing needed is to run REST WS 2.20.0 or beyond.
If I understand correctly you’re talking about sending over the Bahmni Apps locale (not to OpenMRS) but to the standalone reports Java app, correct? That’s your point 1.
And your point 2 is about ensuring that this reports app supports i18n?
Hi @mksd
Yes, you are right about point 1. Reports app is already i18n enable. But about point 2, we are trying to supports i18n for generated reports.