LTR/RTL for Bahmni based on language selection

Tags: #<Tag:0x00007f0f191c2058>

Currently, Bahmni always renders the UI LTR without taking the user selected language’s rendering requirements (LTR / RTL) into consideration. Following is a possible two step approach to inject language specific rendering in Bahmni.

Step 1. To make the Bahmni framework aware of the selected language’s rendering requirements - This is relatively a simpler task at the Bahmni framework level. As user selects language at the time of login, along with the other parameters, Bahmni Framework also sets additional rendering parameter so that every Bahmni App knows the the selected language’s rendering requirements.

Step 2. Handle the rendering of the pages according to the selected language - Following are few possible options to undertake this relatively bigger and time consuming task

A. Bottom Up Approach - Change the rendering of every page to take the language rendering into consideration. There is possibility of duplication of work within an app.

B. Top Down Approach - Bahmni uses App level CSS while rendering the related pages. As a one time activity, the app level CSS should be converted to handle RTL rendering. At the runtime, based on the rendering parameter set at the framework level, the app the makes a decision to include the appropriate CSS that meets user selected language’s rendering requirements.

We have successfully done a POC of these steps using option B for step 2 where we identified and used a tool named RTLCSS to convert registration App CSS at the design time. We also did POC on observation forms using this approach. In addition to the CSS conversion, few controls like calendar needs control level intervention at the design time.

@angshuonline @ramashish @pradipta @binduak