-
Notifications
You must be signed in to change notification settings - Fork 130
Translation
Translating Kalkun to your own language is really easy.
-
Download the translation file:
- If your language is already available in Kalkun, get the
kalkun_lang.php
source file for your language by entering the directory for you language. - If your language is not yet in Kalkun, get the latest source code for English translation.
- If your language is already available in Kalkun, get the
-
Open the file with a text editor and start translating each line. Translate only the part that is after the
=
sign. This is PHP syntax, so you need to escape the'
character by adding a backslash\
before it. For example:\'
. -
Be sure to leave the placeholders unchanged. You can put them wherever you want in the translation label, but leave them as it.
You should see PHP variables like this one:
$lang['Kalkun: Web based SMS Management'] = 'Kalkun: Web based SMS Management';
$lang['Dashboard'] = 'Dashboard';
$lang['Folders'] = 'Folders';
$lang['My Folders'] = 'My Folders';
Change the string based on your language, e.g. Bahasa should be like this:
$lang['Kalkun: Web based SMS Management'] = 'Kalkun: Manajemen SMS Berbasis Web';
$lang['Dashboard'] = 'Dasbor';
$lang['Folders'] = 'Berkas';
$lang['My Folders'] = 'Berkas Pribadi';
You may encounter placeholders like {0}
, {1}
... in the values. Please translate the text and keep these placeholders as is.
Placeholders like {0}
or {1}
... are replaced by PHP at compile time. They follow the syntax of PHP MessageFormatter class.
Open (preferably) a Pull Request or file an Issue with your file attached.
For a new language:
- be sure to create it an directory following codeigniter language (AKA idiom) naming scheme. See CI3 Language Class and list of idioms.
- please also add a copy for your language of the other used translation file. Typically
date_lang.php
&pagination_lang.php
... See full list of these files in any other language directory of kalkun. These translated files should be grabbed from codeigniter3-translations repo.