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 | |
parent | 989c24dc996f9cd29cf660662476fc26c77ba835 (diff) |
Adding locale::display_name().
-rw-r--r-- | core/helpers/locale.php | 9 | ||||
-rw-r--r-- | core/views/l10n_client.html.php | 2 |
2 files changed, 10 insertions, 1 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")); } diff --git a/core/views/l10n_client.html.php b/core/views/l10n_client.html.php index fc5925f0..8f4092c7 100644 --- a/core/views/l10n_client.html.php +++ b/core/views/l10n_client.html.php @@ -5,7 +5,7 @@ <div class="label strings"><h2><?= t("Page Text") ?></h2></div> <div class="label source"><h2><?= t("Source") ?></div> <div class="label translation"><h2><?= t("Translation to %language", - array("%language" => "TODO")) ?></h2></div> + array("language" => locale::display_name())) ?></h2></div> </div> <div id="l10n-client-string-select"> <ul class="string-list"> |