summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-06-06 15:24:14 -0700
committerAndy Staudacher <andy.st@gmail.com>2009-06-06 15:24:14 -0700
commit0e415dae9b29d792f631d3b94349086b8094c920 (patch)
treeedc30275caff571f2d447dd517f42d94fb3e38d7 /modules/gallery/helpers
parent329bd8caa126040ba7abaf28e8f76e0b6739ceff (diff)
Preliminary BiDi support (needs *a lot* of tweaking)
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