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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
configuration [2016/05/06 16:33]
webadmin [Setting the supported languages]
configuration [2016/05/06 17:47]
webadmin [Translating text]
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