Info | ||
---|---|---|
| ||
We are proud to announce that an initial version of in-page localization engine is now widely available within in module repository within Custom Messages Module distribution package. This version of module is compatible with each major version of OpenMRS starting from 1.6 line inclusive. |
What this module does
...
1.1. First official release of module. This release introduces features allowing to do customization of messages from properties files using simple widget on admin web page and store these customization into the database table.
- Initial alpha release
*1.2. * This release introduces principally new approach to customize text on OpenMRS web pages - in-page localization. In other words, this module allows you to do translation of OpenMRS web pages easier then ever – nearly as easy as viewing the pages. With this release we also provided new openmrs:message JSTL tag, and we encourage developers to use it as replacement of spring:message tag, because it includes all functionality provided by spring tag and extends it with ability to control tag output and enhance messaging at all. This point release addressed next tickets:
...
As it was mentioned above, there is new openmrs:message JSTL tag. It was created off spring:message tag, so it includes all functionality of spring's implementation (HTML/JavaScript escaping, arguments passing, using of custom message source resolvable, etc). While we're working on 1.2 release, we converted all occurrences of spring:message to openmrs:message within each major version starting from 1.6 line. And it is advisable to use this tag everywhere you'd want to place old spring:message. So, if you had something like in your module or branch:
Code Block |
---|
<spring:message code="Concept.view.title" arguments="${command.concept.name}" /> just change it to <openmrs:message code="Concept.view.title" arguments="${command.concept.name}" /> |
You won't lose anything doing this, but you'll have a benefit of the fact that your message can be translatable in-page. And even more, with this tag no longer need to add default translation for message code into properties files - just supply it with openmrs:message tag as follows:
Code Block |
---|
<openmrs:message code="your.code" locale="fr">Message text goes here</openmrs:message> |
the rest will be done by smart tag. As you can see, it allows text to be specified in the body of the element instead of the text
attribute (so you can even forget about escaping, the tag will take care of it). And also it allows for locale
attribute to define locale of text (so tags can define text for non-en locales).
...