normalize all locale parts to be ucfirst
authorChuck Hagenbuch <chuck@horde.org>
Sun, 16 Nov 2008 05:06:48 +0000 (00:06 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 16 Nov 2008 05:06:48 +0000 (00:06 -0500)
framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php

index 3e9d012..4598f62 100644 (file)
@@ -7,7 +7,7 @@ class Horde_Support_Numerizer
     public static function factory($locale = null, $args = array())
     {
         if ($locale) {
-            $locale = ucfirst($locale);
+            $locale = str_replace(' ', '_', ucwords(str_replace('_', ' ', strtolower($locale))));
             $class = 'Horde_Support_Numerizer_Locale_' . $locale;
             if (class_exists($class)) {
                 return new $class($args);