Code

Updated language detection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Sep 2007 05:58:08 +0000 (05:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 Sep 2007 05:58:08 +0000 (05:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7219 594d385d-05f5-0310-b6e9-bd551577e9d8

html/setup.php

index 38dc97d2c95baee1d393fb501421be5e07bd2926..623394b1a5587758ba7df906583d0860e1ade9ec 100644 (file)
@@ -93,6 +93,10 @@ if(isset($_POST['lang_selected'])){
 }
 
 $lang = $_SESSION['lang'];
+/* Append .UTF-8 to language string if necessary */
+if(!preg_match("/utf(-)8$/i",$lang)){
+  $lang .= ".UTF-8";
+}
 putenv("LANGUAGE=");
 putenv("LANG=$lang");
 setlocale(LC_ALL, $lang);