The following topic describes how to localize your TrackStudio interface.
Internationalization is the process of changing the format of dates and numbers to the one used in your region and translating user-interface text to your language. For example, the 12th of January 1990 will look like 01/12/90 in the American date format and 12.01.1990 in German one. The date format in TrackStudio is used when displaying and inputting information. Similarly, some user-interface text like Your Name in English can be translated to Ihr Name for German locales.
User locale is specified separately for each user in the user settings (Current User -> User... -> Edit). The list of available locales likely contains the locale that you need, but there may be no language files in TrackStudio for some locales. If you select a locale for which there are no language files, the date format will change to the selected language, but the interface will remain English.
Character Encoding is specified for the entire TrackStudio instance, use Server Manager to specify the character encoding.
trackstudio.encoding UTF-8
The entire TrackStudio text is stored in resource bundles. A resource bundle is a file containing key/value pairs. TrackStudio loads its text using keys while the correct values are retrieved based on the user’s locale settings.
For example, the key/value pairs for the English locale may look like this:
MSG_MENU_ACL=Access Control... MSG_MENU_CATEGORIES=Categories... MSG_MENU_COPY_RECURSIVELY_TASK=Recursively Copy Task {0} MSG_MENU_COPY_TASK=Copy Task {0}
Making your own translation involves copying the English resource bundle, renaming the file, and translating its contents. To do that, find the file language_en.properties in the directory TrackStudio/webapps/TrackStudio/WEB-INF/classes and copy it to a new file. The last two letters in the name of the new file must be a valid ISO Language Code.
These codes are the lower-case two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
When translating from English, you may need to use special characters for you language. Unfortunately, all resource bundle files must be saved in ASCII format, which does not allow for many international characters. It is recommended you work on your translation in a text editor that supports all characters in your language. After finishing your translation, use the native2ascii tool to convert international characters to the ASCII format. Here is how you use the native2ascii tool:
native2ascii -encoding XXX my_translation.properties language_YY.properties
where my_translation.properties is the input file that use national character encoding and language_YY.properties is the output file. The -encoding XXX parameter is optional. If you do not specify it, Java will use the default encoding value, taken from the system property file.encoding. After you translate the file, save it to the directory WEB-INF/classes.
Instead of modifying the file language_YY.properties, you can create language_YY1.properties (for example, language_en1.properties) and redefine only the strings you need in it. In its turn, language_YY1.properties can be extended and redefined with the help of language_YY2.properties, and so on. If a string you need is not defined in the national locale, TrackStudio will take it from the English locale (en, en1...). If it is not defined there either, the identifier of the string will be used instead.