[TYPO3] static_info_tables

H. Hahn h.hahn at hahn-informatica.nl
Thu Sep 11 12:42:05 CEST 2008


A fixed-format as you propose (+33 # ## ## ## ##) would not work for all 
countries. E.g. here in NL certain areas have a two-digit area code and 
a seven-digit subscriber's number (e.g. _31 40 1234567), while other 
areas have a three-digit area code and a 6-digit subscriber's number 
(e.g. +31 495 123456), whereas mobile numbers are formatted like +31 6 
1234 5678. So the first few digits determine how the remainder should be 
formatted.

On top of this, the "official" formatting as proposed by the main 
telecom operator is very unpractical. They propose e.g. +31 (0)40 
1234567, where "+31 40 1234567" is to be used from a foreign country, 
and "040 1234567" for domestic calls. This usage of parentheses is 
contrary to the usage in normal texts, and therefore not clear to everybody.

Belgium has a similar system. E.g. +31 3 1234567 for Antwerp, or +31 16 
123456 for Louvain.

I suggest you have a look at 
http://www.numberingplans.com/?page=dialling&sub=areacodes
Other info can be found via Google with search terms /format 
international "phone number"/

It is not too difficult to write a regular expression to test and/or 
format a phone number as it is typed into an input box.
H. Hahn

Xavier Perseguers schreef:
> Hello,
>
>> You are right. Some months ago I happened to find this list. But at 
>> second thought I realised that my customer is very unlikely to get 
>> the special 08... and 09... numbers in his web forms (08... = free 
>> commercial numbers, 09... = paid commercial numbers). So I could make a 
>
> Yes, I would not need special numbers nor do I want to use the 
> formatted info to actually dial something (it would need pause 
> character and so on), but only to format standard phone/fax and mobile 
> phone number. Perhaps adding a phone_format column to static_countries 
> with something like
>
> +33 # ## ## ## ## (France)
> +41 ## ### ## ##  (Switzerland)
>
> and so on could be sufficient.
>
> If we wish to go a step further, we would have to allow the number to 
> be locally formatted:
>
> 0# ## ## ## ## (France)
> 0## ### ## ##  (Switzerland)
>
> with another column as I was said that Spain always has a '9' at the 
> beginning and never needs an additional '0'.
>
> Last but not least, it would be very, very handy to map this to a 
> special text field with this formatting (one could first choose the 
> country or dynamic update the form according to another field) in BE 
> for data editing.
>


More information about the TYPO3-english mailing list