Skip to content

Commit

Permalink
s/ISO/CLDR for region codes
Browse files Browse the repository at this point in the history
Mimics upstream changes
  • Loading branch information
giggsey committed Mar 25, 2017
1 parent 42b26b4 commit be25fcc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/PhoneNumberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
* our <a href="http://groups.google.com/group/libphonenumber-discuss/about">mailing list</a>.
*
* NOTE: A lot of methods in this class require Region Code strings. These must be provided using
* ISO 3166-1 two-letter country-code format. These should be in upper-case. The list of the codes
* CLDR two-letter region-code format. These should be in upper-case. The list of the codes
* can be found here:
* http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
*
* @author Shaopeng Jia
* @author Lara Rennie
* @see https://github.com/googlei18n/libphonenumber
*/
class PhoneNumberUtil
Expand Down
8 changes: 4 additions & 4 deletions src/geocoding/PhoneNumberOfflineGeocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public static function resetInstance()
* @param PhoneNumber $number a valid phone number for which we want to get a text description
* @param string $locale the language code for which the description should be written
* @param string $userRegion the region code for a given user. This region will be omitted from the
* description if the phone number comes from this region. It is a two-letter uppercase ISO
* country code as defined by ISO 3166-1.
* description if the phone number comes from this region. It is a two-letter uppercase CLDR region
* code.
* @return string a text description for the given language code for the given phone number, or empty
* string if the number passed in is invalid
*/
Expand Down Expand Up @@ -159,8 +159,8 @@ protected function getRegionDisplayName($regionCode, $locale)
* @param PhoneNumber $number a valid phone number for which we want to get a text description
* @param string $locale the language code for which the description should be written
* @param string $userRegion the region code for a given user. This region will be omitted from the
* description if the phone number comes from this region. It is a two-letter uppercase ISO
* country code as defined by ISO 3166-1.
* description if the phone number comes from this region. It is a two-letter upper-case CLDR
* region code.
* @return string a text description for the given language code for the given phone number, or an
* empty string if the number could come from multiple countries, or the country code is
* in fact invalid
Expand Down
6 changes: 3 additions & 3 deletions src/prefixmapper/PrefixFileReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public function mayFallBackToEnglish($language)
* Returns a text description in the given language for the given phone number.
*
* @param PhoneNumber $number the phone number for which we want to get a text description
* @param string $language two-letter lowercase ISO language codes as defined by ISO 639-1
* @param string $language two or three-letter lowercase ISO language as defined by ISO 639
* @param string $script four-letter titlecase (the first letter is uppercase and the rest of the letters
* are lowercase) ISO script codes as defined in ISO 15924
* @param string $region two-letter uppercase ISO country codes as defined by ISO 3166-1
* are lowercase) ISO script code as defined in ISO 15924
* @param string $region two-letter uppercase ISO country code as defined by ISO 3166-1
* @return string a text description for the given language code for the given phone number, or empty
* string if the number passed in is invalid or could belong to multiple countries
*/
Expand Down

0 comments on commit be25fcc

Please sign in to comment.