The i18n features of pHKapa use po files as their translation source.
This makes them easily to integrate with tools like poedit and other common translation tools.
One of the best ways for applications to reach a larger audience is to cater for multiple languages.
This can often prove to be a daunting task, but the internationalization and localization features in pHKapa make it much easier.
First, it’s important to understand some terminology.
Internationalization refers to the ability of an application to be localized.
The term localization refers to the adaptation of an application to meet specific language (or culture) requirements (i.e., a “locale”).
Internationalization and localization are often abbreviated as i18n and l10n respectively; 18 and 10 are the number of characters between the first and last character.
pHKapa will look for your po files in the following locations:
The default domain is ‘default’, therefore your locale folder would look something like this:
So if you need to translate pHKapa just create these po files files for your language.
To create or edit your po files it’s recommended that you do not use your favorite editor.
To create a po file for the first time for your language you should copy the entire folder to the correct location and change the the contents on default.po and cake.po files.
Example → create Spanish this way:
copy /app/Locale/eng/ contents to /app/Locale/spa/
copy /app/Plugin/phkapa/Locale/eng/ contents to /app/Plugin/phkapa/Locale/spa/
Edit LC_MESSAGES/default.po , LC_MESSAGES/cake.po, LC_MESSAGES/phkapa.po files,
translating only msgstr fields to your language
msgid “July” , msgid stays the same
msgstr “Julio” , msgstr is traslation of msgid ( English ) to your language ( Spanish )
After translation please send us your translation so that we can include on next pHKapa versions.
To configure pHKapa to use your new Language go to More Settings
Unless you’re familiar with po file format, it’s quite easy to create an invalid po file or to save it as the wrong charset (if you’re editing manually, use UTF-8 to avoid problems).
There are free tools such as PoEdit which make editing and updating your po files an easy task; especially for updating an existing po files.
The three-character locale codes ( eng , por , spa ) conform to the ISO 639-2 standard.