Add auto language detection

This commit is contained in:
Eike Foken
2011-04-22 01:31:09 +02:00
parent f5795b8721
commit e982a94546
4 changed files with 199 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ $autoload['packages'] = array(APPPATH.'third_party');
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/
$autoload['libraries'] = array('database','session');
$autoload['libraries'] = array('lang_detect', 'database', 'session');
/*

View File

@@ -0,0 +1,31 @@
<?php defined('BASEPATH') || exit("No direct script access allowed");
/**
* Mapping browser's primary language ID to supported language directory.
*/
$config['lang_available'] = array(
'en' => 'english',
'en-uk' => 'english',
'de' => 'german',
'de-at' => 'german'
);
/**
* Default language code. This language MUST be supported!
*/
$config['lang_default'] = 'en';
/**
* Selected language code (is set by the language detection).
*/
$config['lang_selected'] = 'en';
/**
* The name you want for the cookie.
*/
$config['lang_cookie_name'] = 'lang_select_language';
/**
* The number of seconds you want the language to be remembered.
*/
$config['lang_expiration'] = 63072000;