Internationalization (i18n for short) is an important part of
gmodconfig since one the goals of this software is to let users
configure kernel module parameters in the language of their choosing.
To achieve this, the graphic interface as well as the supporting XML
files that contain modules informations need to be translated.
The code uses the gettext package to support i18n strings in the
graphic interface. Strings that need to be translated are marked in the
source code using the
The build process then generates a file called gmodconfig.pot.
This file is the starting point to create a new translation.
My understanding of the process to add a new translation is as follows:
Use a translation tool like
KBabel. First, open the
gmodconfig.pot file in such a tool.
The tool will present you with each string to be translated, one by one
When you're done translating all the strings, save your work as a
<language>.po file. Save that file under the po
directory in the sources.
Add the language code for which you created a translation to the
ALL_LINGUAS variable located in the configure.in file
Re-run autogen.sh, configure and make. From your
.po file this will compile a .mo file for your translation
(this .mo gets released to the users). Then run
make install, and test it.
Contact me (borto AT users . sf . net) and I'll add your translation into CVS.
Translations of a given XML information are stored as siblings XML elements
with the same tag name but with different xml:lang attributes,
as outlined in Daniel Veillard's
To declare an XML file ready for use for a given language, the content
of the following XML elements needs to be translated:
- usage: it appears at the top of the graphic interface when
users click on module names in the left treeview
- about: shows up in the "About" tab
- desc nested inside param: those are parameters