diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-07 13:55:17 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-07 13:55:17 -0800 |
commit | b6c0d3a48ca4fa9296b23a1c4d73fb0573f1b92f (patch) | |
tree | 9fb87920831d65ec21bf31c76973e5f51edcd28e /modules/gallery/helpers | |
parent | 7df4d795e8c5d4b100637f0fea0ad8ef7f6aeabb (diff) |
Refactor the is_rtl() helper into the Gallery_I18n class. This allows checking
for a config value "force_rtl" which will layout the gallery pages in rtl mode
without having to change to an language that is no longer understandable to the
developer.
Adding the line "$config['force_rtl'] = true;" to the config/locales.php file
will make it happen.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/locales.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/gallery/helpers/locales.php b/modules/gallery/helpers/locales.php index d209d414..4af750a3 100644 --- a/modules/gallery/helpers/locales.php +++ b/modules/gallery/helpers/locales.php @@ -131,9 +131,7 @@ class locales_Core { } static function is_rtl($locale=null) { - $locale or $locale = Gallery_I18n::instance()->locale(); - list ($language, $territory) = explode('_', $locale . "_"); - return in_array($language, array("he", "fa", "ar")); + return Gallery_I18n::instance()->is_rtl($locale); } /** |