"Forcing HTTP_ACCEPT_LANGUAGE to lower case string"

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4140 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-12-23 01:53:16 +00:00
parent 036e0d2a15
commit 2ce49ac3ed

View file

@ -360,6 +360,7 @@ class L10n extends Object {
function __autoLanguage() {
$_detectableLanguages = split ('[,;]', env('HTTP_ACCEPT_LANGUAGE'));
foreach ($_detectableLanguages as $key => $langKey) {
$langKey = low($langKey);
if (isset($this->__l10nCatalog[$langKey])) {
$this->language = $this->__l10nCatalog[$langKey]['language'];