Align the text in emails from right to left.

Merchant
Nuo Saudi Arabia
Narys nuo kov. 2021

Hello everyone
How do I align the text in emails from right to left. (I mean order status messages) The entire site works right to left alignment but the messages are still left to right.
Thank you all

Merchant
Nuo Saudi Arabia
Narys nuo kov. 2021

Very cool...
 All messages have the alignment modified. Except for the order confirmation message, the alignment has not changed.
When making a purchase, the customer receives a message with the order details. This message has not modified the alignment.

tim
Founder
Nuo Sweden
Narys nuo geg. 2013
tim

What comes to the email body for the order confirmation it is plain text. So there is no parameter we can send. I read plain text should have the Right to left byter mark. https://en.wikipedia.org/wiki/Right-to-left_mark

Try changing:

$message = strtr(language::translate('email_order_confirmation', $message, $language_code), $aliases);

To: 

$message = "\u200F" . strtr(language::translate('email_order_confirmation', $message, $language_code), $aliases);

or

$message = "\xe2\x80\x8f" . strtr(language::translate('email_order_confirmation', $message, $language_code), $aliases);

https://www.compart.com/en/unicode/U+200F

Merchant
Nuo Saudi Arabia
Narys nuo kov. 2021

All my attempts failed.

Thank you, dear Tim. 
Sorry I took up a lot of your time.
Your presence is the life of this forum and a source of safety for all.
There is no fear for Litecart as long as you are standing behind her.
Accept my warmest regards

tim
Founder
Nuo Sweden
Narys nuo geg. 2013
tim

Thank you for the kind words.
Let's not give up just yet.

Merchant
Nuo Saudi Arabia
Narys nuo kov. 2021

The translation is done

tim
Founder
Nuo Sweden
Narys nuo geg. 2013
tim

I did numerous tests with the right to left byte mark and nothing seems to work with plain text in Gmail. Makes me wonder how gmail users do it?

Merchant
Nuo Saudi Arabia
Narys nuo kov. 2021

I wish I had a little experience in this area to help. But if this becomes possible for you later, make it part of the development of the script.
Thank you for your effort and interest.

tim
Founder
Nuo Sweden
Narys nuo geg. 2013
tim

Absolutely :)

This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.