|
|
(6 intermediate revisions by 3 users not shown) |
Line 9: |
Line 9: |
| }} | | }} |
|
| |
|
| == 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.
| | This page was outdated, please see https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source and https://api.kde.org/frameworks/ki18n/html/index.html |
| | |
| == Step 1: 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:
| |
| <syntaxhighlight lang="bash">
| |
| svn co -N svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4 l10n
| |
| cd l10n
| |
| svn up scripts
| |
| svn up templates
| |
| svn up x-test
| |
| svn up de
| |
| ./scripts/autogen.sh de | |
| ./scripts/autogen.sh x-test | |
| cd de
| |
| mkdir build
| |
| cd build
| |
| cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
| |
| make
| |
| make install
| |
| cd ../..
| |
| cd x-test
| |
| mkdir build
| |
| cd build
| |
| cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
| |
| make
| |
| make install
| |
| </syntaxhighlight>
| |
| | |
| {{note|You need revpath (may be found in package {{program|imake}} or {{program|xutils-dev}}) to run <tt>autogen.sh</tt>}}
| |
| {{tip|Do not combine make and make install in a single step. It will not install anything.}}
| |
| | |
| == Step 2: Test An Application ==
| |
| | |
| To run your application using, for instance, the German catalogs open a terminal (e.g. {{program|konsole}}) and type:
| |
| <syntaxhighlight lang="bash">
| |
| KDE_LANG=de myapp
| |
| </syntaxhighlight>
| |
| where <tt>myapp</tt> is the name of the application you wish to test. Replace the <tt>de</tt> with the language code you wish to test, e.g. <tt>x-test</tt>.
| |
| | |
| 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 x-test language is useful for identifying strings in your application that are not translated.
| |