Closed leodido closed 9 years ago
Metadata are generated running the command.
java -jar \
bower_components/libphonenumber/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar \
BuildMetadataJsonFromXml
But this command class does not have an option to filter metadata by code.
Alternatively, we can filter metadata directly in JavaScript.
/**
* @type {!Object.<number, Array.<string>>}
*/
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap = {
// ...
};
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {!Object.<string, Array>}
*/
i18n.phonenumbers.metadata.countryToMetadata = {
// ...
};
E.g.,
it.i18n.phonenumbers.js
containing only metadata for italian phone numberses.fr.i18n.phonenumbers.js
containing only metadata of spanish and french phone numbersGoals: