Jump to content
Larry Ullman's Book Forums

Entering Numbers In Different Forms


Recommended Posts

I am writing an e-commerce website in multiple languages, including some eastern languages that have numerals in their languages different than the Arabic numerals used worldwide. To give an example:

 

Arabic Numerals: 0 1 2 3,…

Urdu Numerals: ٠ ١ ٣ ٤,…

 

In countries using such Urdu, Persian, etc. numbers, PC keyboards are configured differently, some keyboards are configured to enter the Arabic numerals, while the majority of keyboards are configured to enter their native numbers. This invited a need to design my website so that credit card numbers, address and phone numbers can accept different forms of numerals. Since orders, users, … tables should have one form of numbers only, I am thinking of a script in which the user can enter credit card numbers, address and phone numbers in multiple form numbers and then all forms are translated in the tables to be in one form only, Arabic numerals. I would appreciate sharing any ideas, scripts, etc. to achieve this.

Link to comment
Share on other sites

I've not done anything like this myself, but I would be inclined, as you thought, to store all numbers using one format and then translate numbers accordingly. That should be fairly easy to do as there are direct correlations. You'll also need to pay attention to what format the payment gateway needs its numbers in.

Link to comment
Share on other sites

 Share

×
×
  • Create New...