Make the direction of texts in messages from right to left

Open to all! Ask other shopowners for help.
Post Reply
abofayez

Make the direction of texts in messages from right to left

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

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

Post 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>
abofayez

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

Post 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.
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

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

Post by Omar_one »

Salam alaikum @abofayez
Add this line in your arabic.php

Code: Select all

const HTML_PARAMS = ' dir="rtl" lang="ar"';
Last edited by ecartz on Sat Jul 17, 2021 12:09 am, edited 1 time in total.
Reason: Missing space would break the HTML tag.
abofayez

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

Post 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">
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

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

Post 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"';
abofayez

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

Post by abofayez »

I put the code in the exact location... but unfortunately nothing changed. The problem is still there.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply