Convert English numbers to Arabic numerals

前端 未结 7 676
余生分开走
余生分开走 2020-12-10 01:58

How can i convert English numbers being retrieved from the database to Arabic numeral symbols in PHP.

EDIT: Here\'re some examples of what Arabic numerals look like.

相关标签:
7条回答
  • 2020-12-10 02:28

    Are you trying to convert e.g. Sixty-nine to تسعة وستون? Try if you can call the Google Translate service or another translation service. Otherwise, you should write your own numeral parser and use your knowledge of the Arabic language to translate it to Arabic. (But using a translation service would be a lot easier.) (Then again, PHP might already have a function that writes out numbers and digits in the proper way.)

    0 讨论(0)
提交回复
热议问题