views:

234

answers:

2

Ok, may be you think this dup question but I swear its not. lol 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 put Arabic/Farsi version of 1,2,3 instead of '?'. This is driving me nuts, Q1:How can I using HTML/CSS convert numbers to Arabic/Farsi?

Q2:And why the heck when I change my language (winxp) everything changes except numbers?

+1  A: 
  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.

Ignacio Vazquez-Abrams
Thanks, wouldn't it be slow to go through all character with javascript to convert them one by one?
Mazzi
Of course. That's why you do it in PHP.
Ignacio Vazquez-Abrams
Hmm, then how can I convert 'echo($i)' which outputs English to Arabic?
Mazzi
`$mapping = Array('0' => '۰', '1' => '۱', ...); echo $mapping['1'];`
Ignacio Vazquez-Abrams
fair enough. I just wish all people talked the same language, literally, or better thank god I'm not doing this in Chinese... lol
Mazzi
+1  A: 

If you want to number a list, you could use an ol element and change the list-style-type of it like:

ol {
    list-style: arabic-indic;
}
Gumbo
Thanks. The issue is that the numbers are every where not just in the ol/ul
Mazzi