Translation Resources

Some notes on how to access translated strings:

Translated string may be accessed from DynaSiteObjects:

HashMap messageResources = DynaSiteObjects.getLocaleMessageMap();

String translatedKey = locale + "." + pageItem.getForm().getClassname() + "." + pageItem.getForm_field().getIdentifier()+"_"+ fieldEnumeration.getId().toString();
DynaSiteObjects.getLocaleMessageMap();
String translatedValue = (String) messageResources.get(translatedKey);

Accessing the user's locale via DWL (AJAX):

Locale sessionLocale = (Locale) exec.getHttpServletRequest().getSession().getAttribute("org.apache.struts.action.LOCALE");

sessionLocale is also availble upon every request for Actions that extend BaseAction and BasePatientAction/

Locale: ${sessionLocale}

From jstl bean:message on jsp file:      
Items in the template are in the TemplateResources bundle. Strings in jsp pages are in the ApplicationResources bundle:

<bean:message bundle="ApplicationResources" key="home.search.client"/>

String for each form are in the form's classnameMessages bundle:

<bean:message key="${encounterForm.classname}.label" bundle="${encounterForm.classname}Messages" />