added language detection functionality

This commit is contained in:
2010-02-21 11:27:50 +00:00
parent 3c1a982fd9
commit 407e889c3a
12 changed files with 335 additions and 10 deletions

View File

@ -7,6 +7,7 @@ www_DATA = \
doctypes.php \
hooks.php \
index.html \
lang_detect.php \
mimes.php \
routes.php \
smileys.php \

View File

@ -170,6 +170,7 @@ www_DATA = \
doctypes.php \
hooks.php \
index.html \
lang_detect.php \
mimes.php \
routes.php \
smileys.php \

View File

@ -39,7 +39,7 @@
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/
$autoload['libraries'] = array('database');
$autoload['libraries'] = array('database', 'lang_detect');
/*
@ -79,7 +79,7 @@ $autoload['plugin'] = array();
|
*/
$autoload['config'] = array();
$autoload['config'] = array('lang_detect');
/*

View File

@ -69,7 +69,7 @@ $config['url_suffix'] = "";
| than english.
|
*/
$config['language'] = "english";
$config['language'] = 'english';
/*
|--------------------------------------------------------------------------

View File

@ -0,0 +1,33 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/* SVN FILE: $Id: lang_detect.php 135 2008-11-09 05:49:10Z Roland $ */
/*
|-----------------------------------------------------------------------------
| Configure language detect mechanism
|-----------------------------------------------------------------------------
|
*/
// Mapping browser's primary language id to supported language directory.
$config['lang_avail'] = array(
'en' => 'english',
'ko' => 'korean',
'id' => 'indonesian'
);
// define the default language code. This language MUST be supported!
$config['lang_default'] = 'en';
// the selected language code. Is set by the language detection
$config['lang_selected'] = 'en';
// Language cookie parameters:
// 'lang_cookie_name' = the name you want for the cookie
// 'lang_expiration' = the number of SECONDS you want the language to be
// remembered. by default 2 years.
// Set zero for expiration when the browser is closed.
$config['lang_cookie_name'] = 'lang_select_language';
$config['lang_expiration'] = 63072000;
?>