Translate

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:

/app/Locale/<locale>/LC_MESSAGES/<domain>.po
/app/Plugin/phkapa/Locale/<locale>/LC_MESSAGES/<domain>.po

The default domain is ‘default’, therefore your locale folder would look something like this:

/app/Locale/eng/LC_MESSAGES/default.po (English)
/app/Locale/fra/LC_MESSAGES/default.po (French)
/app/Locale/por/LC_MESSAGES/default.po (Portuguese)

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.

Translate Database

Some database data can also be translated ( Some are already translations , check the suffix in the file name ):

Translate this files and add language suffix to your translation file.
( Spanish example : phkapa_demo_data_spa.sql , phkapa_structure_spa.sql )
For this you must use .sql editor and a little of .sql language.