Difference between revisions of "A Simple Guide to Use Internationalization Library"
m |
|||
| Line 13: | Line 13: | ||
# Export .mo files using the tools above. And copy them into the directory created in step 1. | # Export .mo files using the tools above. And copy them into the directory created in step 1. | ||
# Run the executable, you get translated strings at run-time. | # Run the executable, you get translated strings at run-time. | ||
| + | |||
| + | |||
| + | ==Process Diagram== | ||
| + | |||
| + | [[Image:I18n process diagram.png]] | ||
Latest revision as of 08:18, 27 February 2011
Overview
This page focuses on very simple/general steps to bring i18n library up in your project.
Steps
- Choose and create a directory to put exported translated files (*.mo).
- In your project, initialize a
{I18N_LOCALE_MANAGER}using the dir created in step 1. - Write normal code that uses
{I18N_LOCALE}.translationor{I18N_LOCALE}.plural_translationto get translated texts.{I18N_LOCALE}instances can be queried from{I18N_LOCALE_MANAGER}. - Run po_generation_tool to extract template file (.pot) to be translated.
- Copy the .pot file to .po files with the name of the language you need. For example, es_ES.po for Spanish, ko_KR.po for Korean.
- Translate .po files using external tools like poEdit for Windows and KBabel or gtranslator for KDE and Gnome.
- Export .mo files using the tools above. And copy them into the directory created in step 1.
- Run the executable, you get translated strings at run-time.


