diff options
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 3 | ||||
-rw-r--r-- | include/language.php | 17 | ||||
-rw-r--r-- | view/tpl/conv_item.tpl | 2 | ||||
-rw-r--r-- | view/tpl/conv_list.tpl | 2 | ||||
-rw-r--r-- | view/tpl/search_item.tpl | 2 |
5 files changed, 22 insertions, 4 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 14c9500ff..7fa621470 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -506,7 +506,8 @@ class ThreadItem { 'contact_id' => (($contact) ? $contact['abook_id'] : ''), 'moderate' => ($item['item_blocked'] == ITEM_MODERATED), 'moderate_approve' => t('Approve'), - 'moderate_delete' => t('Delete') + 'moderate_delete' => t('Delete'), + 'rtl' => in_array($item['lang'], rtl_languages()) ); diff --git a/include/language.php b/include/language.php index e7363cffb..d84f02a36 100644 --- a/include/language.php +++ b/include/language.php @@ -451,3 +451,20 @@ function lang_selector() { return $o; } +function rtl_languages() { + return [ + 'ar', + 'arc', + 'ckb', + 'dv', + 'fa', + 'ha', + 'he', + 'khw', + 'ks', + 'ps', + 'sd', + 'ur', + 'yi' + ]; +} diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 5f6c4f6c6..d4299812d 100644 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -89,7 +89,7 @@ {{/if}} {{if $item.body}} <div class="p-2 wall-item-content clearfix" id="wall-item-content-{{$item.id}}"> - <div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}" > + <div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}"{{if $item.rtl}} dir="rtl"{{/if}}> {{$item.body}} </div> </div> diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index 0024ec382..43133027f 100644 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -89,7 +89,7 @@ {{/if}} {{if $item.body}} <div class="p-2 wall-item-content clearfix" id="wall-item-content-{{$item.id}}"> - <div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}" > + <div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}"{{if $item.rtl}} dir="rtl"{{/if}}> {{$item.body}} </div> </div> diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index da5bac5dc..2c4aab9f4 100644 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -88,7 +88,7 @@ {{/if}} {{if $item.body}} <div class="p-2 clrearfix {{if $item.is_photo}} wall-photo-item{{else}} wall-item-content{{/if}}" id="wall-item-content-{{$item.id}}"> - <div class="wall-item-body" id="wall-item-body-{{$item.id}}" > + <div class="wall-item-body" id="wall-item-body-{{$item.id}}"{{if $item.rtl}} dir="rtl"{{/if}}> {{$item.body}} </div> </div> |