This article describes how to convert and edit po files using Poedit Software. It is cross-platform software build in wxWidgets toolkit and easy to use. Last year I wrote about the PO to MO converter topic, but unfortunately most of the search are bounced because of the method, it was
msgfmt and you need commands. I think most of them are searching for an UI application to achieve the same. Here comes the software Poedit. I’m going to write about the usage of Poedit application.
Hoping that you are installed that without any error or warning. then we can start from each menu item with relevant screens.
1. Files->Catalogs Manager
The ‘Catalog’ is file with .po extension. when we click on the menu item new window will come with a title “Catalogs Manager”, lets you easily manage catalogs you work on. It provides quick and convenient access to your PO files from one centralized place. List of existing projects is on the right side of manager window, files contained in active project are on the left side.
2. Files->New Catalog..
Creates new catalog. Note that you will have to immediately save the file so that poEdit knows catalog’s position in directory tree relative to source code. You will get a new window to add your project details on the first tab. It is all about the project details and encoding details. Nothing to worry just fill the required filed or leave it blank. Fig (2)
And Move the Second Tab. There you can add the projects source file path to update/add all the translation string from files. Fig (3) Updating CatalogIn addition to editing catalogs, poEdit provides convenient way of updating catalogs. Updating is process of scanning source files for translatable strings and merging the changes back into the catalog, removing entries that are no longer used, adding entries that appeared in sources since the last revision of the catalog and updating references.
“Keywords” let you specify additional keywords understood by the parser. See Fig (4) By default, xgettext parser understands _, gettext and gettext_noop keywords. You may leave this page empty.
In this example Fig (3) the source code files are saved in the src folder so the reference “./src” the .po file is located in the same folder where the src located. Once you click ok button Fig (3), the poeditor will scan the source code directory and all the translation text will list on the next window Fig (4). The Final Process is to save the catalog(.po file) to the location. You can Open the .po file and the view will like show at below, there you can enter the Translation texts.
You can also check for the command line interface of the po to mo converter.