summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-08 21:32:03 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-08 21:32:03 -0700
commit1ecdb5ef0c82272d8019e4b7d834432f73baf474 (patch)
tree1d6d989b7928e5843624ce7ed8782c9b8aabb607 /modules/gallery/helpers
parentf0ca27ab924c06cc72a44d66498b86aeda672b33 (diff)
parentb9ee6f7d185c734dcff595d06d9c6e6fda5822ac (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/locale.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/helpers/locale.php b/modules/gallery/helpers/locale.php
index c176dcc6..9783a53a 100644
--- a/modules/gallery/helpers/locale.php
+++ b/modules/gallery/helpers/locale.php
@@ -114,7 +114,9 @@ class locale_Core {
return self::$locales["$locale"];
}
- static function is_rtl($locale) {
- return in_array($locale, array("he_IL", "fa_IR", "ar_SA"));
+ static function is_rtl($locale=null) {
+ $locale or $locale = I18n::instance()->locale();
+ list ($language, $territory) = explode('_', $locale . "_");
+ return in_array($language, array("he", "fa", "ar"));
}
} \ No newline at end of file