From 0e82e2047351fea4a9f55fabb377b1f1d8fd25c9 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 10 Nov 2008 15:03:49 +0100 Subject: [PATCH] The first part of the locale is the language, not the country; but this is 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php b/framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php index 3bc0d98af..3e9d012d8 100644 --- a/framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php +++ b/framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php @@ -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); } -- 2.11.0