texts align from right to left

Ask the community for help and support.
Post Reply
abofayez
Posts: 24
Joined: Tue Jun 01, 2021 9:28 pm
Been thanked: 3 times

texts align from right to left

Post by abofayez »

Hello
I translated the script from English to Arabic ... but I could not make the texts align from right to left. how can I do that ?
thank you all
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: texts align from right to left

Post by ecartz »

If you look in template_top.php, you will see

Code: Select all

<html<?php echo HTML_PARAMS; ?>>
Then if you look in your main language file, you should have something like

Code: Select all

const HTML_PARAMS = '';
Change that to something like

Code: Select all

const HTML_PARAMS = ' dir="rtl"';
I linked to the English translation in core. The German translation might be a better example:

Code: Select all

const HTML_PARAMS = ' dir="ltr" lang="de"';
So probably for Arabic:

Code: Select all

const HTML_PARAMS = ' dir="rtl" lang="ar"';
Note that all non-empty examples start with a space. That's important. Otherwise it will break the HTML tag.

Please realize that I don't actually know the correct values for Arabic, as I don't work in it. I think that my last example is correct, but you may find it better to ask someone who is familiar with Arabic in HTML for the correct values.

Also, CE PhoenixCart assumes that the text will be in UTF-8. You may have already done that, but mentioning just in case.

If you have a completed translation, you may upload it at app.php/addons/free/language-23
abofayez
Posts: 24
Joined: Tue Jun 01, 2021 9:28 pm
Been thanked: 3 times

Re: texts align from right to left

Post by abofayez »

Thank you with all my heart for helping me
Post Reply