Localization - l10n - or Internationalization - i18n - are technical names for software translation, more that only change the words in a software interface, is a cultural and contextual adaptation of software for each country and/or region with a specific language and habits.
For Apache OpenOffice, the used technology is based in a big text file, called SDF. This file contains all the strings (texts, expressions, phrases and others) that are present in the user interface and help system.
Currently, the more used way in open source projects, and more easy, to work with localization is based in Gettext framework, that have an extensive set of tools for translation. The Gettext have its work based in the PO file format. See below for some examples.
So, to translate Apache OpenOffice for a new language, basically we need:
- Get the SDF source in english (base language);
- Convert from SDF to POT file (PO Template - a PO file without any translation);
- Translate all strings;
- Rename all translated POT files to PO (one time that are translated, this files aren't more templates);
- Convert from PO to SDF file (we can accept a PO package/zip file);
- Open a bug against L10N section in our bug track system
- Wait a build with your language pack.
Some useful tools
- For convertion: translation toolkit - tools oo2po and po2oo;
- For offline translation:
A simple example of all process
- Get the source - the POT files;
- If OpenOffice.org had version for your language, you can use it for speed up your translation. See the next steps;
- Find and download the SDF file in your language here: http://svn.apache.org/viewvc/incubator/ooo/trunk/extras/l10n/source/
- Install translate toolkit in your machine - if Debian, 'apt-get install translatetoolkit';
- Enter in work directory (where is the SDF file);
- Type: 'cat en-US.sdf your-language.sdf > old.sdf' - with this command will join in one both files;
- Type: 'oo2po --source-language=en-US -l your-language -i old.sdf your-language' - with this part, will create a new directory called 'your-language' with many PO translated files.
- With your translation tool, if have the resource of Translation Memory (TM), you can add this directory as your TM. Lokalize (of KDE) have this resource;
- Open a POT file to start your translation;
- Run the option "Fill the match strings" (or some thing like this), for your translation tool to fill all strings that match 100%. In Lokalize this option is Ctrl+Alt+B.
- Translate what is empty and revise what is fuzzy.
- Finish UI part (all files except 'helpcontent2', that is the translation of help system);
- Open a issue in our bug track system and attach the zip of PO files;
- Finish the HELP part and open other issue in our bug track system;