M
Mohsen Pahlevanzadeh
Dear all,
I have a gift for mailing list:
////////////////////////////////
def integerToPersian(number):
listedPersian = ['Û°','Û±','Û²','Û³','Û´','Ûµ','Û¶','Û·','Û¸','Û¹']
listedEnglish = ['0','1','2','3','4','5','6','7','8','9']
returnList = list()
listedTmpString = list(str(number))
for i in listedTmpString:
returnList.append(listedPersian[listedEnglish.index(i)])
return ''.join(returnList)
////////////////////////////////////
When you call it such as : "integerToPersian(3455)" , it return Û³Û´ÛµÛµ,
Û³Û´ÛµÛµ is equivalent to 3455 in Persian and Arabic language.When you read
a number such as reading from databae, and want to show in widget, this
function is very useful.
My question is , do you have reverse of this function? persianToInteger?
Yours,
Mohsen
I have a gift for mailing list:
////////////////////////////////
def integerToPersian(number):
listedPersian = ['Û°','Û±','Û²','Û³','Û´','Ûµ','Û¶','Û·','Û¸','Û¹']
listedEnglish = ['0','1','2','3','4','5','6','7','8','9']
returnList = list()
listedTmpString = list(str(number))
for i in listedTmpString:
returnList.append(listedPersian[listedEnglish.index(i)])
return ''.join(returnList)
////////////////////////////////////
When you call it such as : "integerToPersian(3455)" , it return Û³Û´ÛµÛµ,
Û³Û´ÛµÛµ is equivalent to 3455 in Persian and Arabic language.When you read
a number such as reading from databae, and want to show in widget, this
function is very useful.
My question is , do you have reverse of this function? persianToInteger?
Yours,
Mohsen