From: Jakob Sack Date: Sun, 19 Jun 2011 21:46:59 +0000 (+0200) Subject: Autodetection of language is working now X-Git-Tag: v3.0~267^2~498 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=99ae7cd47777f7d7176194d4caced9036fcb1f46;p=nextcloud-server.git Autodetection of language is working now --- diff --git a/lib/l10n.php b/lib/l10n.php index 8a7ff9d8535..f760d78c72b 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -224,7 +224,7 @@ class OC_L10N{ $accepted_languages = preg_split( '/,\s*/', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ); foreach( $accepted_languages as $i ){ $temp = explode( ';', $i ); - if( array_key_exists( $temp[0], $available )){ + if( array_search( $temp[0], $available ) !== false ){ return $temp[0]; } }