Fix language detection for gettext
This commit is contained in:
@@ -17,6 +17,5 @@ $hook['post_controller_constructor'] = array(
|
||||
'filepath' => 'hooks'
|
||||
);
|
||||
|
||||
|
||||
/* End of file hooks.php */
|
||||
/* Location: ./application/config/hooks.php */
|
||||
/* Location: ./application/config/hooks.php */
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?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;
|
||||
32
application/config/language.php
Normal file
32
application/config/language.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php defined('BASEPATH') || exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Supported Languages
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| Contains all languages your site will store data in. Other
|
||||
| languages can still be displayed via language files, that's totally
|
||||
| different.
|
||||
|
|
||||
| Check for HTML equivalents for characters such as <20> with the URL
|
||||
| below:
|
||||
|
|
||||
| http://htmlhelp.com/reference/html40/entities/latin1.html
|
||||
|
|
||||
*/
|
||||
$config['supported_languages'] = array(
|
||||
'en'=> array('name' => 'English', 'locale' => 'en_US'),
|
||||
'de'=> array('name' => 'Deutsch', 'locale' => 'de_DE')
|
||||
);
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Default Language
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| If no language is detected, which one to use? Must be in the
|
||||
| array above.
|
||||
|
|
||||
*/
|
||||
$config['default_language'] = 'en';
|
||||
Reference in New Issue
Block a user