> From: Justin Mclean [mailto:jus...@classsoftware.com] 
> Sent: 14 February 2012 13:25
>
> With minimal changes (phone format and currency symbol 
> would be all I think) it could be converted to an en_GB locale.
I have started working my way through Justin's patch to convert it to an
en_GB version, but I'm stuck on phone numbers. The rules for phone number
formats are complex in the UK and I don't know the best way of expressing
the formatter.

For example, these are all valid, properly formatted, UK numbers:

+44 20 xxxx xxxx
(020) xxxx xxxx
(016977)  xxxx
0800 xxxxxx
0800 xxx xxxx
01332 050xxx
074xx xxxxxx

When the number starts with the international dialling code details - +44, -
then the 0 at the beginning of the number is dropped, the area code (if the
number has one) is mandatory and is shown separated by spaces. Finally, the
rest of the number is shown, formatted depending on length.

If the number has an optional area code (which varies in length from 3 to 6
digits), then that area code is shown inside () brackets. If the 0xx... part
is mandatory (such as with 07... mobile numbers) then no ()'s are used.

Can anyone give me a clue how to tackle this?

David.

Reply via email to