This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
configuration [2016/05/06 16:33]
webadmin [Setting the supported languages]
configuration [2016/05/06 17:56]
webadmin [I18N]
Line 463: Line 463:
 =====I18N===== =====I18N=====
-Wildbook is a web-based application with an internationalization (I18N) foundation in its code base.+Wildbook is a web-based application with an internationalization (I18N) foundation in its code base. Wildbook is not yet fully translated. Most of the JSP files are localized but none of the servlets are yet. Work is underway to complete localization.
-TBD+Wildbook loads translated strings from the standard Java properties files, which reside in Wildbook'​s WEB-INF/​classes/​bundles directory or can be overridden (on a file-by-file basis) in the equivalent path in the data directory.
 ====Setting the supported languages==== ====Setting the supported languages====
Line 502: Line 502:
 ====Translating text==== ====Translating text====
-TBD+Most pieces of text in Wildbook pages (HTML and JSP files) are contained in translatable properties files. For example, the page for an Encounter (encounter.jsp) pulls its strings from WEB-INF/​classes/​bundles/​en/​encounter.properties (English text). Here is an example of the contents of encounter.properties.
 +encounter = Encounter
 +unidentifiable_title = Unidentifiable Encounter Number
 +unapproved_title = UNAPPROVED Encounter Number
 +title = Encounter
 +identified_as = Identified as:
 +workflowState = Workflow state:
 +setWorkflowState = Set Workflow State
 +matched_by = Matched by
 +status = Status
 +New name-value pairs can be added to these files as needed and loaded with Java logic like the following:
 +#loading the contents of a properties file
 +String context=ServletUtilities.getContext(request);​
 +String langCode=ServletUtilities.getLanguageCode(request);​
 +Properties encprops = ShepherdProperties.getProperties("​encounter.properties",​ langCode, context);
 +#loading a specific property and embedding it in a JSP file's HTML