Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
The Database Messages Module module registers itself as a default Message Provider and provides a set of management screens that will allow the user to add/edit/delete messages.
After the installation is completed, you will observe that all message translation files which are stored in the WEB-INF/messages_**.properties files in the webapp are moved to the database. OpenMRS reads these and outputs for the user. You can Add/Search properties/translations from the module's admin page.
By default internationalization(I18N) of OpenMRS is handled by the Spring Framework reads files called as messages**.properties. These files are shipped with OpenMRS in the war file. Modifying them is tricky and only temporary. With the databasemessages module installed, the messages are stored in the database. Admins can then easily change them without the need to restart and without the fear of losing edits.
Modules provide their own translation files in their omod file. The databasemessages module picks these up and will write to its database automatically when a new module is installed.
When the module is uninstalled can again use the previous mechanism where in Spring reads all of our message properties translation files from the webapp again.
You will have to provide the Message Key/Code , the locale id (en_US,en_GB,it,pt,fr,etc) which specifies the language and the value/message for that specified Code and locale.
A message will be displayed saying if successfully saved or not.
If you will try to insert a duplicate message for an already existing Code in the same Language then an error message will be displayed.
Error message displayed
1 Comment
Saptarshi Purkayastha
Feature request from Joquain Blaya - Export properties file for a locale from the database