diff options
author | xue <> | 2007-07-26 01:21:43 +0000 |
---|---|---|
committer | xue <> | 2007-07-26 01:21:43 +0000 |
commit | 7ca846467da923a2bd39ef3f554e26e1f589c85e (patch) | |
tree | 879f0134d1ae217b92183d7283f8ca8ee7d514b1 /framework/I18N/core/CultureInfo.php | |
parent | 21dde48b3caf7ee8aff1343c22f6ef5c18ee167b (diff) |
Fixed #678.
Diffstat (limited to 'framework/I18N/core/CultureInfo.php')
-rw-r--r-- | framework/I18N/core/CultureInfo.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/framework/I18N/core/CultureInfo.php b/framework/I18N/core/CultureInfo.php index 404c81fe..15370ebe 100644 --- a/framework/I18N/core/CultureInfo.php +++ b/framework/I18N/core/CultureInfo.php @@ -201,6 +201,18 @@ class CultureInfo }
/**
+ * Gets the CultureInfo that for this culture string
+ * @return CultureInfo invariant culture info is "en".
+ */
+ public static function getInstance($culture)
+ {
+ static $instances = array();
+ if(!isset($instances[$culture]))
+ $instances[$culture] = new CultureInfo($culture);
+ return $instances[$culture];
+ }
+
+ /**
* Determine if a given culture is valid. Simply checks that the
* culture data exists.
* @param string a culture
|