Modifying WLab using the strings.xml file

On your Tomcat server, in the webapps/WLab/conf directory there is a second XML file, strings.xml. This contains all of the string (text) values that a user of WLab sees. They can be modified as you see fit, e.g. if you wish to translate the application into a language other than English.

strings.xml is ordered by the WLab page the values correspond to. For example, the page studentlablist.html – i.e. the initial screen which greets a student and lists their labs when they log in – has a section in the file, labconsoleview.html has a section, and so on.

The ordering of this file is probably organised more with developers in mind than WLab system administrators, so the simplest way for you to find a particular value you wish to change is to locate it within the WLab application itself, and then do a search in strings.xml for it.

Each value is contained in an XML element such as the following:

<entry key="retMainMenu" value="Return to main menu"/>

You should only modify the text in the value element. The surrounding XML and the key value MUST be retained intact.

Above or near each element, you should find a comment that explains its purpose.

Longer values may run across several lines, such as:

<entry key="tooManyBookings" value="
Sorry! You have already exceeded your maximum allowed 
number of bookings!
"/>

In these cases you may split the value across as many lines as you need for easy of reading. However, be very sure that you maintain the final closing “/> marker.

For values that contain HTML, the < and > characters have to be replaced with [ and ], so as to avoid breaking surrounding XML markup. Consider the example below:

<entry key="studentLabListBookingBlurb" value="
Alternatively, you can book guaranteed time on the system
by using the [a href='BOOKINGPAGE']booking page[/a]. You can
book hour slots of time on the system, either spread out, or
in a consecutive block. During this booked time your labs will 
never be shut down.
"/>

Some values may also contain placeholders. In the example above, BOOKINGPAGE is such a placeholder. In most cases you must retain these placeholders somewhere in the string if you modify it. The comment above the element will explain such requirements. Similarly, any restrictions on elements that contain HTML will also be detailed in the comments.