Skip to content
tenzap edited this page Apr 13, 2022 · 6 revisions

Translating Kalkun to your own language is really easy.

  1. Download the translation file:

  2. 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: \'.

  3. Be sure to leave the placeholders unchanged. You can put them wherever you want in the translation label, but leave them as it.

Example

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';

Placeholders

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.

Submit your translation file

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.
Clone this wiki locally