Frameworks, Kohana, PHP

Kohana Internationalization

Kohana has a fairly simple and easy to use i18n system. Kohana has a __() function to do your translations for you. This function is only meant for small sections of text, not entire paragraphs or pages of translated text.

To echo a translated string:

echo __('username');

To change the displayed language:


To define the language file for the above language change, create a i18n/en.php that contains:

return array
    'username' => 'Username:',