From 70b8c57d220aaaa361967343e2ca7dfa62632569 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 13 Jul 2023 09:47:50 +0000 Subject: basic per item rtl language support - issue ##1780 --- Zotlabs/Lib/ThreadItem.php | 3 ++- include/language.php | 17 +++++++++++++++++ view/tpl/conv_item.tpl | 2 +- view/tpl/conv_list.tpl | 2 +- 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}}
-
+
{{$item.body}}
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}}
-
+
{{$item.body}}
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}}
-
+
{{$item.body}}
-- cgit v1.2.3