This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, Would you happen to have any examples on using culture with a phone number. Thanks
|
|
|
Hi Robert, We don't have any examples of this -- as far as I know the .NET CultureInfo and RegionInfo classes do not provide any information about phone number formats. If you could say a bit more about what you want to do then we may be able to offer some advice. |
|
|
Well, I was hoping that you had examples for creating the proper format per country phone number. For example : (XXX) XXX-XXXX US etc.
|
|
|
Ah, I see. Unfortunately we don't have that information (I am not even sure that all countries define a standard number format -- certainly I've seen several different layouts used in the UK, and New Zealand appears to format mobile numbers differently from fixed line numbers). However in general a mask format along the lines of (000) 000-0000 should suffice. For countries where phone number lengths may vary, use 9 for optional digits -- for example I believe NZ mobile numbers may have 6 or 7 digits after the provider code, e.g. 000 0000009. Use \0 to specify a literal zero: e.g. NZ phone numbers always begin with 0, so the mask might be \00 000 0000. You are unlikely to encounter other special characters in a phone number string but if you come across anything exotic then you can always check against the documentation. Sorry we can't help with the actual format data itself: you might try the ITU-T or some other international industry body to see if they aggregate national formats anywhere. |
|