Code

Updated langauage detection in setup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Sep 2007 05:57:20 +0000 (05:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Sep 2007 05:57:20 +0000 (05:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7218 594d385d-05f5-0310-b6e9-bd551577e9d8

html/setup.php

index 5ba7e4a5bbb974b0c867bc655f563dcb4dd28cce..60917222aa9a8e556e8cf601ee8a9763e95c195c 100644 (file)
@@ -92,9 +92,9 @@ if(isset($_POST['lang_selected'])){
 }
 
 $lang = $_SESSION['lang'];
-
-if(!preg_match("/utf8/i",$lang)){
-  $lang .= ".UTF8";
+/* Append .UTF-8 to language string if necessary */
+if(!preg_match("/utf(-)8$/i",$lang)){
+  $lang .= ".UTF-8";
 }
 putenv("LANGUAGE=");
 putenv("LANG=$lang");