IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: Phone numbers and i18n
My argument against this is that a phone number is tied to a location, and should not be reformatted based upon who is viewing it. All US phone numbers should display as (123) 456-7890, no matter whether the person viewing the web page is in the US or Mexico. In the database, as well as in our business object layer, my contention is that this number should be stored as a single unformatted String: "1234567890".

Do you have to handle extensions? It can be hard to tell (123)456-7890 from 123-4567 ext 890 in an unformatted string.

And where are you storing the country information? You really have to associate it with each phone number some how, because if your going to the trouble of handeling international phone numbers you should also handle companies and people that have phone numbers in multiple countries.

You should probably do some research on international standards, I know there is a standard for phone numbers that goes something like +country code-area code-sub code-remaining digits.

Jay
New Re: Phone numbers and i18n
Do you have to handle extensions? It can be hard to tell (123)456-7890 from 123-4567 ext 890 in an unformatted string.
Good question. I hadn't considered the possiblity of extensions yet (the code for writing the PhoneNumber class is not in my domain on this project; it's just an example that a co-worker and I discussed this morning, so it's what I used here.) My initial thought is that that would be another member on the object, possibly blank, and stored as only numbers inside a String, similar to how I've proposed storing the phone number itself.

And where are you storing the country information? You really have to associate it with each phone number some how, because if your going to the trouble of handeling international phone numbers you should also handle companies and people that have phone numbers in multiple countries.
You are absolutely correct in this. The country would need to be stored with the phone number itself so that we know 1) which class to produce out of the factory, and 2) how to format it (which inherently falls out of 1) above.)

You should probably do some research on international standards, I know there is a standard for phone numbers that goes something like +country code-area code-sub code-remaining digits.
I'll go look into that; didn't really know that there was a "standard" as such. Thanks.
-YendorMike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
     Phone numbers and i18n - (Yendor) - (39)
         Only thing I would question - (jake123)
         If you want to make your display useful - (Arkadiy) - (3)
             What else could you store it as? -NT - (drewk)
             Re: If you want to make your display useful - (Yendor) - (1)
                 Country code, area code, main number, extension -NT - (Arkadiy)
         Re: Phone numbers and i18n - (JayMehaffey) - (1)
             Re: Phone numbers and i18n - (Yendor)
         Basically, you're totally wrong, and your colleague right. - (CRConrad) - (22)
             American users are helped by it - (drewk) - (17)
                 In Charlotte, and surrounding area,... - (a6l6e6x)
                 No - (tuberculosis) - (15)
                     True, if everything's 10-digit no need for the '1' -NT - (drewk)
                     the leading one is to route to a stp for long distance - (boxley) - (2)
                         I know why its there - (tuberculosis) - (1)
                             duh, forgot about that :-) - (boxley)
                     Here too - (SpiceWare)
                     Well, (probably because I'm a contrarian) - (jb4) - (9)
                         Note on "overlaid" area codes. - (static) - (8)
                             Houston did both - (SpiceWare) - (7)
                                 Sounds like they didn't give enough notice. - (static) - (1)
                                     wasn't much - (SpiceWare)
                                 Re: Houston did both - (JayMehaffey)
                                 The reason our "Bell system" will NEVER increase... - (jb4) - (3)
                                     rule of 7 is long gone - (SpiceWare) - (2)
                                         Yes, of course - (jb4) - (1)
                                             I think that rule is slightly faulty anyway. - (static)
             In A5a, it works like this. - (Another Scott) - (1)
                 wrt Canada - (jake123)
             Also, a11y. - (pwhysall)
             That's why you're an international linguist... - (jb4)
         I've had a little experience storing I18n phone numbers. - (static) - (3)
             Maybe you have to assume some level of user knowledge - (drewk) - (2)
                 Not to mention, having an International internal phone sys. - (folkert)
                 Definitely. - (static)
         The only thing you can assume - (tuberculosis) - (4)
             Have to disagree with that one - (drewk) - (2)
                 It would be a LOT of work - (tuberculosis)
                 No, Todd is right - (tonytib)
             Re: The only thing you can assume - (JayMehaffey)

Sharp as a balloon.
95 ms