added language detection functionality
This commit is contained in:
@ -7,6 +7,7 @@ www_DATA = \
|
||||
doctypes.php \
|
||||
hooks.php \
|
||||
index.html \
|
||||
lang_detect.php \
|
||||
mimes.php \
|
||||
routes.php \
|
||||
smileys.php \
|
||||
|
@ -170,6 +170,7 @@ www_DATA = \
|
||||
doctypes.php \
|
||||
hooks.php \
|
||||
index.html \
|
||||
lang_detect.php \
|
||||
mimes.php \
|
||||
routes.php \
|
||||
smileys.php \
|
||||
|
@ -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');
|
||||
|
||||
|
||||
/*
|
||||
|
@ -69,7 +69,7 @@ $config['url_suffix'] = "";
|
||||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = "english";
|
||||
$config['language'] = 'english';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
33
codepot/src/codepot/config/lang_detect.php
Normal file
33
codepot/src/codepot/config/lang_detect.php
Normal 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;
|
||||
|
||||
?>
|
Reference in New Issue
Block a user