Is there a way to display decimal numbers of an ordered list in language of the Website? For example I have an ordered list in a Farsi language Website (<html lang="fa">), but decimal numbers before each list item appear in English instead of in Farsi!
Markup example of an ordered list in Farsi:
<ol dir="rtl">
<li>کتابهای زیادی در شصت و سه درصد گذشته</li>
<li>چاپگرها و متون بلکه روزنامه و مجله</li>
<li>لورم ایپسوم متن ساختگی با تولید سادگی</li>
</ol>
https://codepen.io/smohadjer/pen/GBQVgr
You are probably looking for "list-style: arabic-indic;".
You can see all available styles here: https://mdn.github.io/css-examples/counter-style-demo/
There is also a draft spec to create your own symbols for numbered lists, but it is only supported in the latest Firefox so far. See https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style
Also a better reference for the list-style-type CSS attribute can be found here: https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With