-
Notifications
You must be signed in to change notification settings - Fork 4
Translate localized strings with PoEdit
PoEdit is the recommended PO-file editor for RescueMe developers. It is able to analyze source code by looking for all occurrences from a given set of localization functions. The string argument to these functions are the words and sentences which should be localized into other languages. The editor is able to analyze these and present a list of unique words and sentences, which make maintenance easier. RescueMe source code is in English, so the default locale is en_US
.
The editor stores all localized string and meta information in PO-files, one for each language. Each PO-file is maintained by PoEdit by recursively inspecting source code in at one or more folders relative to a base path. The base path is stored in each PO-file as a custom PO-file parameter, X-Poedit-Basepath
.
Each time you change a localized string in a folder associated with the PO-file, you have to click Update
in the editor. New or modified localized string (identifiers) are detected automatically, and if possible, translated automatically using already translated text. When you click Save
in the editor. PoEdit generates a MO-file (binary) in same locating as the PO-file.
Important
There is however one unfortunate shortcoming. The editor only understands absolute base paths, which makes is a little cumbersome for several developers to maintain these files concurrently. Since base paths are stored in each PO-file, any developer attempting to update the PO-file first have to [change to a base path](Change PoEdit base path to local repository) which matches the local repository location.
Note
In PoEdit, every PO-file is called a catalog. You should create a PoEdit project named RescueMe
and set the project root to path/to/rescueme/src
for easy access to all catalogs (PO-files) in RescueMe. See [Create PoEdit project](Create PoEdit project) for more information.
###Guides
- [Create PoEdit projects](Create PoEdit projects)
- [Create PO-files using PoEdit](Create PO-files using PoEdit)
- [Update PO-files using PoEdit](Update PO-files using PoEdit)
- [Change PoEdit base path to local repository](Change PoEdit base path to local repository)
###Prerequisites
Ensure that you have PHP, php gettext extension and PoEdit installed on you machine.