diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/css/l10n_client.css | 12 | ||||
-rw-r--r-- | modules/gallery/helpers/locale.php | 6 | ||||
-rw-r--r-- | modules/gallery/libraries/MY_View.php | 7 | ||||
-rw-r--r-- | modules/gallery/views/admin_block_log_entries.html.php | 2 |
4 files changed, 20 insertions, 7 deletions
diff --git a/modules/gallery/css/l10n_client.css b/modules/gallery/css/l10n_client.css index 8e668072..bab1d0ed 100644 --- a/modules/gallery/css/l10n_client.css +++ b/modules/gallery/css/l10n_client.css @@ -71,7 +71,9 @@ how it wants to round. */ #l10n-client-string-select { display:none; float:left; - width:25%;} + width:25%; + direction: ltr; +} #l10n-client .string-list { height:17em; @@ -150,17 +152,19 @@ how it wants to round. */ float:left; width:74%;} - #l10n-client-string-editor .source { +#l10n-client-string-editor .source { overflow:hidden; width:50%; float:left;} - #l10n-client-string-editor .source .source-text { +#l10n-client-string-editor .source .source-text { line-height:1.5em; background:#eee; font-family: monospace; text-align: left; height:16em; margin:1em; padding:1em; - overflow:auto;} + overflow:auto; + direction: ltr; +} #l10n-client-string-editor .translation { overflow:hidden; 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 diff --git a/modules/gallery/libraries/MY_View.php b/modules/gallery/libraries/MY_View.php index 836d1087..bd2794a0 100644 --- a/modules/gallery/libraries/MY_View.php +++ b/modules/gallery/libraries/MY_View.php @@ -43,4 +43,11 @@ class View extends View_Core { return ""; } } + + public function main_element_attributes() { + if (locale::is_rtl()) { + return 'class="rtl"'; + } + return ''; + } } diff --git a/modules/gallery/views/admin_block_log_entries.html.php b/modules/gallery/views/admin_block_log_entries.html.php index 5d8f3084..38070fe1 100644 --- a/modules/gallery/views/admin_block_log_entries.html.php +++ b/modules/gallery/views/admin_block_log_entries.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <ul> <? foreach ($entries as $entry): ?> - <li class="<?= log::severity_class($entry->severity) ?>"> + <li class="<?= log::severity_class($entry->severity) ?>" style="direction: ltr"> <a href="<?= url::site("user/$entry->user_id") ?>"><?= p::clean($entry->user->name) ?></a> <?= date("Y-M-d H:i:s", $entry->timestamp) ?> <?= $entry->message ?> |