Languages

Localization

Software comes with support for multiple languages, along with language selection by each individual user.

Loading language files

Language files are loaded automatically by the software whenever you try to access a line of text.

Creating language files

Plugins come with their own language files which are imported into the database table “core_languages_data” automatically upon installation. In addition to that, software has a set of basic language files that contain common content (such as dates, error messages, etc). To create or add your own language text, you may create create new language files in the “application/languages/your_language” folder. Here’s an example language file:

$language = array(
	'day' => 'Day',
	'days' => 'Days',
	'week' => 'Week'
);

Fetching text

You may access any line of text using this function:

__('keyword', 'file');

Note that language content provided by plugins is accessed slightly differently, see Plugins section in the developer guide for more details.

Core language files

There are several core language files that are included as part of the core framework. These files are located in the “system/languages/your_language” folder. They can be accessed the same way as in the example above, except that instead of using the plugin and section, you would use the file name. For example file called “date.php” can be accessed like this:

__('week', 'date');

Extending core language files

It is possible to extend core language files by creating files with the same name and placing them in the “application/languages/your_language” folder.