Search code examples
htmlcssfontsfarsi

Farsi/Arabic number to be outputted properly


You have a file that outputs as such:

<div id="first">1</div>
2
<div id="third">
    <? $i = 3; echo(i) ?>
</div>

Which outputs:

1
2
3

Now if I want to have an output as below:

?
?
?

Well, I was hoping I could output the Arabic/Farsi version of 1,2,3 instead of '?'. How can I use HTML/CSS convert to numbers to Arabic/Farsi?

And why does everything change except numbers when I change my language (Windows XP)?


Solution

    1. There is no automated way to change numbers, or even digits. Set up a mapping between then and convert manually.

    2. Numbers are never localized, because unlike natural language words, Arabic numerals are understood across most of the world.