Altcoins Talks - Cryptocurrency Forum

Crypto Discussion Forum => Forum related => Topic started by: yhiaali3 on January 30, 2024, 12:25:02 PM

Title: Solving problem of direction when writing in oriental languages on local boards
Post by: yhiaali3 on January 30, 2024, 12:25:02 PM
Hello all
It is known that the forum contains several sections in local languages, some of which are oriental, written from right to left. There is a problem with displaying the content correctly in these sections related to the direction.

Since I registered in the forum, the problem of writing in Arabic has been very annoying to me because the formatting and direction appear incorrectly, especially when writing bullet points or English terms, where the sentence appears upside down and is completely incomprehensible, as in the following example.

(https://www.talkimg.com/images/2024/01/28/kVPSI.jpeg)

As you can notice, in the writing shaded in the red box, the sentence appears upside down, and the words that should be after the English word appear before it, as well as the period that should be at the end of the sentence.

This problem was very annoying to me, and it is certain that it bothers all the members who write from right to left, so I decided to search for a solution to this problem because I have some experience in programming web pages. The important thing is that after a little research, it became clear to me that the problem is very simple and can be solved by adding a simple code to the page. It changes its direction from left to right, as all browsers consider English to be the default language. If this code is not added, the page is treated as being in English, and here is the problem.

I conducted a test using the website developer tool integrated with Google Chrome, right-click and choose Inspect, and the page appears as in the previous image.

We note that the main tag of the page, which is Html, in which the general attributes of the page are placed, does not contain the code for the page direction, and therefore the browser treats this page as if it is in the English language and gives it a default direction from left to right, and therefore the directions appear upside down.

The code currently used, as shown in the picture, does not contain any direction instructions

Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml">
To solve this problem, I added the code for the Arabic language direction, which is:
Code: [Select]
dir="rtl"
The complete code is:
Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
The page appears in its correct format, exactly as in the picture

(https://www.talkimg.com/images/2024/01/28/kVT95.jpeg)

As you can see, this simple instruction only tells the browser that the contents of this page are from right to left, and the browser will undertake all the necessary formatting to display the Arabic page, or even other languages that write from right to left, such as Persian and Hebrew, to display it in the correct format.

Of course, in this case, the writing will automatically go from right to left, and you will not have to use the right alignment tool.

Of course, these changes that I made will disappear as soon as I update the page, because I do not have the permissions to make changes to the page, and this tool is for testing only.

Therefore, I hope that @admin will make the required changes to the main page of the Arabic section and the sections that write from right to left, as well as the sub-pages.
Title: Re: Solving problem of direction when writing in oriental languages on local boards
Post by: hugeblack on January 31, 2024, 07:12:44 AM
I can confirm this. Without a solution to this problem, writing in local board would be impossible due to manually need to modify the text from right to left and for a single English word you will need to many modify many things for each line.
Title: Re: Solving problem of direction when writing in oriental languages on local boards
Post by: hugeblack on February 23, 2024, 07:48:44 AM
bump