python - How to convert normal numbers into arabic numbers in django -
python - How to convert normal numbers into arabic numbers in django -
i have list of numbers [1,2,3,....]
now want convert them standard arabic numbers using django.
is possible? ideas welcome.
try function:
def entoarnumb(number): dic = { 0:'۰', 1:'١', 2:'٢', 3:'۳', 4:'۴', 5:'۵', 6:'۶', 7:'۷', 8:'۸', 9:'۹', .:'۰', } homecoming dic.get(number)
and utilize this:
ar_numbers = [entoarnumb(num) num in numbers]
python django
Comments
Post a Comment