From 0e415dae9b29d792f631d3b94349086b8094c920 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Sat, 6 Jun 2009 15:24:14 -0700 Subject: Preliminary BiDi support (needs *a lot* of tweaking) --- modules/gallery/helpers/locale.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/gallery/helpers') 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 -- cgit v1.2.3