Development/Tutorials/Localization/Building KDE's l10n Module: Difference between revisions

From KDE TechBase
m (fix link)
No edit summary
Line 1: Line 1:
== Abstract ==
{{TutorialBrowser|
 
series=Localization|
 
name=Building KDE's l10n Module|


For those working on applications in KDE's main repository, building and installing language support from KDE's localization (l10n) module is a good idea. Doing so will allow you to test applications in other languages so as to spot problems related to localization that may exist in KDE. Learn how to do just that in this tutorial.
pre=[[Getting_Started/Sources/Using_Subversion_with_KDE|Using Subversion with KDE]]<br>[[Getting_Started/Build/Unstable_Version|Building KDE From Subversion]]<br>[[Development/Tutorials/i18n|Writing Applications With Localization in Mind]]|


== Prerequisites ==
}}
Technology:
* KDE


== Abstract ==


Tutorials:
For those working on applications in KDE's main repository, building and installing language support from KDE's localization (l10n) module is a good idea. Doing so will allow you to test applications in other languages so as to spot problems related to localization that may exist in KDE. Learn how to do just that in this tutorial.
* [[Getting_Started/Sources/Using_Subversion_with_KDE|Using Subversion with KDE]]
* [[Getting_Started/Build/Unstable_Version|Building KDE From Subversion]]
* [[Development/Tutorials/i18n|Localization 110: Writing Applications With Localization in Mind]]


== Step 1: kdesdk ==
== Step 1: kdesdk ==

Revision as of 02:41, 10 January 2007

Building KDE's l10n Module
Tutorial Series   Localization
Previous   Using Subversion with KDE
Building KDE From Subversion
Writing Applications With Localization in Mind
What's Next   n/a
Further Reading   n/a

Abstract

For those working on applications in KDE's main repository, building and installing language support from KDE's localization (l10n) module is a good idea. Doing so will allow you to test applications in other languages so as to spot problems related to localization that may exist in KDE. Learn how to do just that in this tutorial.

Step 1: kdesdk

First, checkout the kdesdk module from the repository, then build and install it. If you have trouble building the kdesdk module, you can skip the troublesome parts. The main thing you need from the kdesdk module is the poxml folder. KBabel is also nice to have but not essential.

Step 2: l10n

You must download, build and install each language in the l10n module separately. You can check out and build just the German, and XX languages using the following procedure:

svn co -N svn://anonsvn.kde.org/home/kde/trunk/l10n
cd l10n
svn up scripts
svn up templates
svn up xx
svn up de
./xx/internal/update_xx.sh

Once this is done, switch to you build directory, start cmake in the l10n/xx, l10n/de, etc directories that you wish to build the language support for one at a time. You may then make and install from the build directory.

Tip
Do not combine make and make install in a single step. It won't install anything.


The ./xx/internal/update_xx.sh step uses the transxx program in kdesdk/poxml to automatically produce the XX language translation. If you were not able to build the kdesdk/poxml files, skip the ./xx/internal/update_xx.sh step. You'll have to rely on someone else running it and committing to the code repository.

Step 3: Text An Application

To run your application using, for instance, the German catalogs open a terminal (e.g. konsole) and type:

KDE_LANG=de myapp

where "myapp" is the name of the application you wish to test. Replace the "de" with the language code you wish to test, e.g. "xx".

The German language is a good choice for testing the layout of your application, as German translated strings tend to be quite long. French is also a good choice. The XX language is useful for identifying strings in your application that are not translated.