# I18n Koseven has a fairly simple and easy to use i18n (translation) system. It is slightly modeled after gettext, but is not as featureful. ## __() Koseven 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: This will echo `Hello, world!` unless you've changed the defined language, which is explained below. ## Changing the displayed language Use the [I18n::lang()](../api/I18n#lang) method to change the displayed language: I18n::lang('fr'); This will change the language to French. ## Defining language files To define the language file for the above language change, create a `i18n/fr.php` that contains: 'Bonjour, monde!', ); Now when you do `__('Hello, world!')`, you will get `Bonjour, monde!` ## I18n variables You can define variables in your `__()` calls like so: echo __('Hello, :user', [':user' => $username]); Your i18n key in your translation file will need to be defined as: 'Bonjour, :user', ); ## Defining your own __() function You can define your own `__()` function by simply defining your own i18n class: