# Languages ​​module

If the website is not intended to be used in multiple languages, the language module must not be activated. Required variables of the default language according to setting $webutler_config['defaultlang'], are loaded automatically.

Switching the language in the visitor view automatically. For a language is assigned in the administration of each page. Important switching is mainly when modules are used to use the language constants. This applies, for example, for the forms module, so all error and confirmation messages are displayed in the language of the visitor.

If the language module is activated, the default language of $webutler_config['defaultlang'] must according to be created.

## Functionality

Each content page is assigned to create a language when. When a module is include in a page, this page must be created separately for each language, as the language variables of the module are loaded by using the language of the page.

If multilingualism is subsequently activated, all existing pages must be subsequently assigned to a language. It makes sense to own layout file should be created with all the language-specific header settings and separate menu files for each language.

## Administration

Before working with the language module, all necessary module and translations should be available and flag icons set. The translation files must always add "/long" are in the subdirectory. Multilingualism is activated globalvars.php in the variable $webutler_config['languages'].

In the administration and the language code of the language name can be defined. Subsequently, any language can be assigned a home page. This item can with the variable $webutler_config['setnewlang'] are disabled.

The language code must match the file name of the language files: code "de" for the files de.php or de.js, code "en" for the files en.php or en.js. You should use the ISO 639-1 codes, then there are no problems with the CKEditor.

## Integrate language

The template for the language is simply placed anywhere on the pages.
<?PHP include "includes/languages/langblock.php"; ?>
Add your own modules can be queried of the visitors language with session variable
$_SESSION['language']