From 886fd07bc209e525a8e3e9b11f904bb6b346deab Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Thu, 12 Feb 2009 03:01:52 +0000 Subject: Adding locale::display_name(). --- core/helpers/locale.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/helpers') 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")); } -- cgit v1.2.3