Active
Project:
Phone Number
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2012 at 10:47 UTC
Updated:
5 Sep 2012 at 07:55 UTC
From #1133536: Format spaces separations in the phone number:
Posted by g1smd on July 8, 2012 at 6:15pm
I'm the UK metadata editor for the Google libphonenumber project over at:
http://code.google.com/p/libphonenumber/
The xml metadata file there has number length, validation and formatting information as well as an example number for each number type in each country.Perhaps you could use this data here?
Looks like there is a usable PHP port at https://github.com/davideme/libphonenumber-for-PHP
However, the license is Apache License 2.0. Don't think that would be suitable for inclusion in Drupal GPL module? Unless we integrate the lib separately.
Comments
Comment #1
g1smd commentedYou could use just the XML metadata file and process that however you want (get the latest one from the official gLPN site), or you could use the entire (PHP or other) code library too.
I'm not so sure about licensing, but the intention is that the library and data is re-used as widely as possible. Indeed it (the Java version) is already built into the core of Android 4 and used by FBM and a number of other apps. A number of web sites already use this functionality for validation and formatting too.
Comment #2
ckng