texts align from right to left

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

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


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 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

Re: texts align from right to left

Post by abofayez »

Thank you with all my heart for helping me


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