The first part of the locale is the language, not the country; but this is
authorJan Schneider <jan@horde.org>
Mon, 10 Nov 2008 14:03:49 +0000 (15:03 +0100)
committerJan Schneider <jan@horde.org>
Mon, 10 Nov 2008 14:03:49 +0000 (15:03 +0100)
what we want to use anyway, so fix the variable name.
We might want to ucfirst() all locale parts, so that a country-specific locale
(e.g. for de_AT) would result in a class name
Horde_Support_Numerizer_Locale_De_At.

framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php

index 3bc0d98..3e9d012 100644 (file)
@@ -13,9 +13,9 @@ class Horde_Support_Numerizer
                 return new $class($args);
             }
 
-            $country = array_shift(explode('_', $locale));
-            if ($country != $locale) {
-                $class = 'Horde_Support_Numerizer_Locale_' . $country;
+            $language = array_shift(explode('_', $locale));
+            if ($language != $locale) {
+                $class = 'Horde_Support_Numerizer_Locale_' . $language;
                 if (class_exists($class)) {
                     return new $class($args);
                 }