OLAT uses Java properties files for all internationalization strings. There are some exceptions that will be discussed later in this paper.
The properties files are located in olat3/webapp/i18n/default/language_code. language_code stands for the locale. Examples: en, de, fr, en_US, de_CH...
Beginning from Release 5.0, the properties files are located in the subfolder _i18n of a respective java-package, postfixed with the language. E.g. org/olat/modules/fo/_i18n/LocalStrings_de.properties
If you wish to translate OLAT to a new language and you want to contribute this translation to the OLAT community, please contact us first. We have a dedicated translation server where your translations will automatically be checked into our CVS and we can communicate you the changes that happend in the code due to code refactoring and development. We would love to have your favorite language as an official OLAT language!
The increased community effort for OLAT translations lead to different new requirements within the i18n translation tool. Thus it is planned for OLAT 6.1.x (spring 2009) to have a completely new translation tool available and also a set of developer tools to
move keys from one package to another
move whole i18n packages
bundle a language as one zip (jar) file for easy deployment
Nevertheless the chapter about i18n concept is still valid, but changes have to be expected soon.
Languages are configured in olat3/webapp/WEB-INF/olat_config.xml. Add new languages in the Localization module and set the default locale. You sould make your changes in the olat_config.xml.in rather than in the olat_config.xml file. You can then run ant config-all to generate your olat_config.xml file.
OLAT has a handy translation tool built into the system so that you do not have to understand an IDE like eclipse. The main translation files can be edited via webbrowser.
During a translation phase it makes sense to set the flag localization.cache=false in the olat3/build.properties file. Set this property to true in a production environment since this reloads the file from disk for every request.
Log in as administrator
Use top navigation tab 'Administration'
Choose 'Online Translation Tool' from the menu
Select your new language or a language that you want to edit
Hit 'Create all ToDos' to create all properties for the new language as a copy from the systems default language
Choose a package and start translating. ToDo's have an X before the = sign. E.g. command.closeprintingX= is not translated und should be set to command.closeprinting=Close printview
Save your changes
When debug=true is configured in the build.properties file you can use the GUI debug mode (bottom left side of screen) to directly translate any string in the GUI or even modify the HTML fragments.
In addition to the files located in the i18n directory some localized strings are located at some other places. These exceptions are described below:
olat3/webapp/WEB-INF/src/org/olat/ims/resources/xsl/results2html_*.xsl
Files used for the QTI results screen. Copy and paste from a language that you understand and create a new file.
olat3/webapp/static/disclaimer/disclaimer_*.html
File used in registration procedure. Copy and paste from a language that you understand and create a new file.
olat3/webapp/WEB-INF/src/org/olat/core/gui/components/form/_static/js/jscalendar/lang/calendar-*.js
The popup calendar files. They are already available in several languages. However, some languages seem to be broken. If the calendar popup does not work in your language then the best approach is to compare your language file with the "de" or "en" version and add the missing elements.
olat3/webapp/help/help-course_*.zip
This is the help course that launches when you click on help in the top navigation. Unzip an available course and modify it so that it fits your needs. Be careful when modifying the course structure by hand!
Do not forget to configure the new help course for your language in the olat_config.xml file (see below).
olat3/webapp/WEB-INF/olat_config.xml
You should modify the olat_config.xml.in file and then run ant config-all to generate the olat_config.xml file!
Add your language in the I18nManager module and in the AuthProvider section.
A good link about servlets / i18n can be found at http://tagunov.tripod.com/i18n/i18n.html