[Fusionforge-commits] r10868 - branches/Branch_5_0/gforge/common/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Tue Oct 5 10:43:45 CEST 2010


Author: nerville
Date: 2010-10-05 10:43:45 +0200 (Tue, 05 Oct 2010)
New Revision: 10868

Modified:
   branches/Branch_5_0/gforge/common/include/gettext.php
Log:
from trunk: fix setup locales

Modified: branches/Branch_5_0/gforge/common/include/gettext.php
===================================================================
--- branches/Branch_5_0/gforge/common/include/gettext.php	2010-10-04 19:24:50 UTC (rev 10867)
+++ branches/Branch_5_0/gforge/common/include/gettext.php	2010-10-05 08:43:45 UTC (rev 10868)
@@ -186,7 +186,8 @@
 }
 
 function setup_gettext_from_langname ($lang) {
-	$locale = language_name_to_locale_code($lang).'.utf8';
+	$locale[] = language_name_to_locale_code($lang).'.utf8';
+	$locale[] = language_name_to_locale_code($lang).'.UTF-8';
 	setup_gettext_from_locale ($locale) ;
 }
 
@@ -197,10 +198,17 @@
 		$lang = $GLOBALS['sys_lang'] ;
 	}
 
-	$locale = language_name_to_locale_code($lang).'.utf8';
+	$locale[] = language_name_to_locale_code($lang).'.utf8';
+	$locale[] = language_name_to_locale_code($lang).'.UTF-8';
 	setup_gettext_from_locale ($locale) ;
 }
 
+/*
+ * setup_gettext_from_locale() - call setlocales to set up language used by gettext
+ *
+ * @param   array   locales (.utf8 + .UTF-8)
+ */
+
 function setup_gettext_from_locale ($locale) {
 	setlocale(LC_ALL, $locale);
 	




More information about the Fusionforge-commits mailing list