summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Gallery_I18n.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-02-10 20:57:53 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-02-10 20:57:53 +0000
commit10e36fcf1b5acf07c5cc128105af03fb09aac89e (patch)
treec5e815b0a4c540d0dc7bc5f90dd1eae3df31017e /modules/gallery/libraries/Gallery_I18n.php
parent052476ef44ca801766cbd6bdbfe42d5a0a362e52 (diff)
parent8ef08d20883d9b9aa0b7560ce3bf6da8a6632149 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries/Gallery_I18n.php')
-rw-r--r--modules/gallery/libraries/Gallery_I18n.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/gallery/libraries/Gallery_I18n.php b/modules/gallery/libraries/Gallery_I18n.php
index 4e0c1f82..cfed046a 100644
--- a/modules/gallery/libraries/Gallery_I18n.php
+++ b/modules/gallery/libraries/Gallery_I18n.php
@@ -87,6 +87,16 @@ class Gallery_I18n_Core {
return $this->_config['default_locale'];
}
+ public function is_rtl($locale=null) {
+ $is_rtl = !empty($this->_config["force_rtl"]);
+ if (empty($is_rtl)) {
+ $locale or $locale = $this->locale();
+ list ($language, $territory) = explode('_', $locale . "_");
+ $is_rtl = in_array($language, array("he", "fa", "ar"));
+ }
+ return $is_rtl;
+ }
+
/**
* Translates a localizable message.
*