-
Notifications
You must be signed in to change notification settings - Fork 4
Create PO files using PoEdit
Follow this guide when you need to create a new PO-file in RescueMe. This is typically required when you have created a new domain or when adding a translation of the default language en_US
into a new language. The latter would require a a new PO-files for every domain in RescueMe, including the non-domain
definition of localized language names in locales.php
.
Note
In PoEdit, a PO-file is called a catalog.
###Prerequisites
Ensure that you have PHP, php gettext extension and PoEdit installed on you machine.
###Open PoEdit
The first time it opens, you are asked for you full name and email address. This is automatically inserted into every PO-file you make.
- Goto File -> New Catalog...
Every PO-file requires the following information
Field | Tab | Required |
---|---|---|
Project name and author | Transl.prop. | Format RescueMe x.x.x
|
Team | Transl.prop. | DISCOOS/RescueMe |
Team's email address | Transl.prop. | [email protected] |
Language | Transl.prop. | For example fr_FR or nb_NO
|
Charset | Transl.prop. | UTF-8 |
Source code charset | Transl.prop. | UTF-8 |
Base path* | Source paths |
path/to/rescueme/src in local repository |
Paths | Source paths | Relative paths to folders in base path |
Keywords** | Source keywords |
T_ and T_locale
|
- Select OK when you are finished entering all required values
- Goto Catalog -> Update from Sources
This will populate the list of localized string
###Translate all text into given language
The editor sorts all strings not translated yet in the top of the list.
###Save changes
- File -> Save
This will save all changes to the PO-file and generate the binary MO-file in same location as the PO-file. The gettext layer is not able to read the translations before the MO-file is generated.