diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-02-12 03:01:52 +0000 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-02-12 03:01:52 +0000 |
commit | 886fd07bc209e525a8e3e9b11f904bb6b346deab (patch) | |
tree | 38249cd7a9413745ebc945c29c299e5a9745dcbc /core/helpers/locale.php | |
parent | 989c24dc996f9cd29cf660662476fc26c77ba835 (diff) |
Adding locale::display_name().
Diffstat (limited to 'core/helpers/locale.php')
-rw-r--r-- | core/helpers/locale.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/helpers/locale.php b/core/helpers/locale.php index 78ef5158..6605f2af 100644 --- a/core/helpers/locale.php +++ b/core/helpers/locale.php @@ -84,6 +84,15 @@ class locale_Core { self::$locales = $l; } + static function display_name($locale=null) { + if (empty(self::$locales)) { + self::_init_language_data(); + } + $locale or $locale = I18n::instance()->locale(); + + return self::$locales->$locale; + } + static function is_rtl($locale) { return in_array($locale, array("he_IL", "fa_IR", "ar_SA")); } |