Skip to main content

Localizing the Open Language Tools XLIFF Translation Editor

Contents

Introduction
L10n requirements
Translation

Introduction

This document aims to describe the l10n procedure of OLT XLIFF editor from a point of view of a translator.

L10n requirements

In order to do l10n of the OLT XLIFF editor the user must:

  1. Install JDK 1.5.0 (note: JRE is not enough; JDK installation contains native2ascii application which will be used)
  2. Install OLT XLIFF Filters 1.2.6 or better (note: in filters 1.2.6 recursive processing of directories has been added)
  3. Install OLT XLIFF Editor 1.2.6 or better

Translation

Short version:

  1. unzip i18n.zip in <EDITOR_HOME>/i18n directory
  2. run renamer.sh from <EDITOR_HOME>
  3. select the i18n dir as Path
  4. replace LOCALE in 'Rename To' field with locale (fr_FR,de_DE,es_ES ...)
  5. Hit 'Test' and preview
  6. Hit 'Rename' to rename
  7. Run filters
  8. Drop the i18n directory on filters
  9. ... if all works fine, you'll get .xlz files in the i18n directories
  10. .... translate (create a project etc) ...
  11. Backconvert files, select UTF8 as target encoding
  12. run native2ascii -encoding UTF8 <file> on each backconverted file
  13. restart the editor to see the strings in action

Long version

The process of translation of the XLIFF editor consists of translation of java .property files. The property files need to be encoded in iso-8859-1 encoding and all characters not contains in this encoding need to escaped correctly to form a UTF8 character in order to be correctly read in and displayed in the editor. The .property files also need to comply to a naming convention for locale which is used. For example file
MainFrame.properties
for German translation needs to be renamed to
MainFrame_de_DE.properties
to be displayed correctly in German localized environment.

Preparation

All editor's l10n files are zipped in the file i18n.zip under directory i18n in the directory where the editor has been installed. Unzip the file in the location where it's present. A set of directories will be created. The directories directly copy the inner structure of the application, so there are many directories and many .property files. Most of these files map directly to user interface components which need to be translated.

All these .property files already are encoded in iso-88592-1 encoding and contain the default UI strings. The files' names do not contain the locale part which needs to be added. To rename the property files one can use a shell, a bulk renamer or an application called Renamer installed in the directory where the editor is installed.

Rename source files

To run the application, go to the directory where the editor is installed and run
renamer.sh
or
renamer.bat
In the text field labeled Path: select the directory where you unzipped the i18n.zip file. Then in the field labeled Rename to: replace the string LOCALE to desired locale, for example for French replace LOCALE with fr_FR. Hit the 'Test' button to preview the name transformation. If it's OK then press 'Rename' button to rename the files.

Warning:The file will be renamed , that means that the original files will disappear !

Create .xlz files

Start the XLIFF OLT Filters and drop the i18n directory on the filters window. If all goes well the i18n directory will contain the .xlz file which you can translate

Translate and backconvert

Start the OLT XLIFF Editor and create a project. Translate files. When backconverting, select the i18n directory and UTF8 as target encoding. Run native2ascii from JDK's bin directory on each backconverted .properties file as:
				native2ascii -encoding UTF8 <file> <out_file>
			
or
				native2ascii -encoding UTF8 <file> >  <out_file>
			

Test

Any time you restart the editor, you can preview the changes, since the editor uses the i18n directory when loading the locale, but the files must be stored in the same hierarchy as they are in in the i18n.zip file!
 
 
Close
loading
Please Confirm
Close