Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML - Arabic Support

i have a website in which i have to put some lines in Arabic.... how to do it...

where to get the Arabic text characters... how to make the page support Arabic...

i have to put a line per page and there is a lotta lotta pages so can't go around making images and putting them...

alt text

like image 552
Moon Avatar asked Aug 30 '10 15:08

Moon


People also ask

Is Arabic a UTF 8?

In order for the Arabic characters to be displayed in URLs in your browser the characters are encoded into a Latin based encoding called UTF-8 which typically are a 4 character hexadecimal string. An example would be the Arabic letter و WAW which is converted to D988.

How to add rtl in html?

Setting up a right-to-left pageAdd dir="rtl" to the html tag any time the overall document direction is right-to-left (RTL). This sets the default base direction for the whole document. All block elements in the document will inherit this setting unless the direction is explicitly overridden.

How to change text direction html?

To set text direction in HTML, use the style attribute. The style attribute specifies an inline style for an element. The style attribute is used with the CSS property direction to set direction. Just keep in mind, the usage of style attribute overrides any style set globally.


1 Answers

This is the answer that was required but everybody answered only part one of many.

  • Step 1 - You cannot have the multilingual characters in unicode document.. convert the document to UTF-8 document

advanced editors don't make it simple for you... go low level...
use notepad to save the document as meName.html & change the encoding
type to UTF-8

  • Step 2 - Mention in your html page that you are going to use such characters by

    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
  • Step 3 - When you put in some characters make sure your container tags have the following 2 properties set

    dir='rtl' lang='ar' 
  • Step 4 - Get the characters from some specific tool\editor or online editor like i did with Arabic-Keyboard.org

example

<p dir="rtl" lang="ar" style="color:#e0e0e0;font-size:20px;">رَبٍّ زِدْنٍي عِلمًا</p> 

NOTE: font type, font family, font face setting will have no effect on special characters

like image 185
Moon Avatar answered Sep 20 '22 13:09

Moon