summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/locale.php9
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"));
}