Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
Silver

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...