How to use poEdit
Categories: C, Source Code
Tags:
In this guide I will explain how to simplify the localization process of a software written in c++ using “wxWidget (a cross platform toolkit), with poEdit.
poEdit offers to developers a conventient approach to localizazion, and there is no need to modify the source code by hand to modify translations, because they are all stored on a catalog file that is easy editable.
To prepare the source code to the localization, we must sorround all strings that we want to localize with the macro “_()”, for example:
...
wxMessageBox( _("localized string") );
...
wxMessageBox( wxT("not localized string") );
When all strings to translate are sorrounded with the macro, we can start the translation process launching poEdit: when we run the program for the first time, it will ask us general information about the team, the author of the translation, the language and other boredoms.
When the program has been started go to “File”, “New Catalog”
Compile the “Project info” tab as in picture, go to the “Paths” tab and add the source code path in the “Base path” text box and in the paths list below.
Click “Ok” and save your “.po” file in the project directory.
Now you can see a summary windows that shows all strings that you can to translate:
If you get an error, don’t worry! Go on “Catalog” -> “Update from sources” and all should go right.
Now go to “View” -> “Display quotes” and start the translation! In the left bottom textbox you can insert the the translation of the string, inside the quotes.
When you finish the translation you can save, and you’ll find in the project directory the files “default.po” and “default.mo”. The file “.mo” is the real localization file, but if you want to change the translation use the “.po” file, so don’t delete it.
Part 2 of the article “Localization of a c++ wx project (using poEdit)” will be published soon.
Se sei interessato a questo post, potresti anche provare a leggere:
- No related posts
04 Jan 2008 inandrea

Please try to be more simple and explaining in your tutorial. For a new user “arbitrary jump” of writer from one place to another without explaining is very difficult to understand.
UsandoGracias por el tutorial =D
UsandoThank you for this tutorial! I cant understand why there isnt a wiki in the poEdit site, its really hard for new users to get how it works.
Usando