Page 1 of 1

Make the direction of texts in messages from right to left

Posted: Wed Jul 14, 2021 10:09 am
by abofayez
How do I make the site's messages align from right to left? All pages have the orientation modified, but the messages were not able to make the direction from right to left
thank you

Re: Make the direction of texts in messages from right to left

Posted: Fri Jul 16, 2021 1:49 pm
by heatherbell
abofayez wrote: Wed Jul 14, 2021 10:09 am How do I make the site's messages align from right to left? All pages have the orientation modified, but the messages were not able to make the direction from right to left
thank you
I'm not sure what you mean by 'messages' but if you are able to add html to the message, maybe add the Bi-Directional Override tag, for example,

Code: Select all

<bdo dir="rtl">Your Message<bdo>

Re: Make the direction of texts in messages from right to left

Posted: Fri Jul 16, 2021 11:41 pm
by abofayez
Sorry, I'm using Google Translate... the translation may not be correct.
The intended messages are the messages that the customer receives when registering on the site, when making a purchase order, or when order status changes.
These letters all show the align of the writing from left to right. I want to make the align from right to left as in the Arabic language .. But I did not find the file responsible for this modification.

Re: Make the direction of texts in messages from right to left

Posted: Fri Jul 16, 2021 11:54 pm
by Omar_one
Salam alaikum @abofayez
Add this line in your arabic.php

Code: Select all

const HTML_PARAMS = ' dir="rtl" lang="ar"';

Re: Make the direction of texts in messages from right to left

Posted: Sat Jul 17, 2021 8:20 am
by abofayez
alaikum aSalam
marhaba Omar
I am using this code in the first line of the Arabic language file(arabic.php) and it works perfectly on all pages of the site. But it has no effect on messages.
Do I replace it with the previous line.
Please tell me exactly where to put the code.
thank you

The code currently in use:

<html lang="ar" dir="rtl"><head>
<div style='text-align:right'>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">

Re: Make the direction of texts in messages from right to left

Posted: Sat Jul 17, 2021 9:29 am
by heatherbell
abofayez wrote: Sat Jul 17, 2021 8:20 am Please tell me exactly where to put the code.
In your /includes/languages/arabic.php
Find:

Code: Select all

// Global entries for the <html> tag
const HTML_PARAMS = '';
In your file, it must be:

Code: Select all

// Global entries for the <html> tag
const HTML_PARAMS = ' dir="rtl" lang="ar"';

Re: Make the direction of texts in messages from right to left

Posted: Sat Jul 17, 2021 10:34 am
by abofayez
I put the code in the exact location... but unfortunately nothing changed. The problem is still there.