Editing Documentation/Maemo 5 Developer Guide/Application Development/Maemo Localization
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | This section describes how to localize | + | This section describes how to localize maemo applications. Localization is needed to provide native translations of the software. The section contains information on how to localize an application, how to ease extraction of message strings, how to make the translations, and how to test the localization. |
- | Changes are presented with code examples to help the localization process. | + | Changes are presented with code examples to help the localization process. MaemoPad is used as an example here. |
== Localization == | == Localization == | ||
Line 19: | Line 19: | ||
To localize an application, l10n needs to be set up before <code>gtk_init()</code> by including the following headers: | To localize an application, l10n needs to be set up before <code>gtk_init()</code> by including the following headers: | ||
- | + | maemopad/src/main.c | |
<source lang="c"> | <source lang="c"> | ||
Line 28: | Line 28: | ||
To initialize the locale functions, the following lines need to be added: | To initialize the locale functions, the following lines need to be added: | ||
- | + | maemopad/src/main.c | |
<source lang="c"> | <source lang="c"> | ||
Line 39: | Line 39: | ||
The most important of these are <code>GETTEXT_PACKAGE</code> and <code>localedir</code>, which come from <code>configure.ac</code>: | The most important of these are <code>GETTEXT_PACKAGE</code> and <code>localedir</code>, which come from <code>configure.ac</code>: | ||
- | + | maemopad/configure.ac | |
<source lang="autoconf"> | <source lang="autoconf"> | ||
Line 71: | Line 71: | ||
Thus, the i18n version of the example would be: | Thus, the i18n version of the example would be: | ||
- | + | maemopad/src/main.c | |
<source lang="c"> | <source lang="c"> |
Learn more about Contributing to the wiki.