read phone region codes for one country.

@param pphoneCountryCode country code of the phone number
@param plocale language to create data for
@return map of area code and area name
324147
public static Map<String, String> readPhoneRegionCodes(final String pphoneCountryCode,
      final Locale plocale) {
    return CreateClassHelper.readMapFromProperties(
        "PhoneRegionCode" + pphoneCountryCode + "Constants", plocale,
        "phoneRegionCodes" + pphoneCountryCode);
  }
550460
@Override
    public CountryContract getCountryFromCode(String countryCode) {
        if(StringUtils.isBlank(countryCode)) return null;
        CountryContract country = getKcCountryService().getCountryByAlternateCode(countryCode);
        if(country==null){
            country = getKcCountryService().getCountry(countryCode);
        }
        return country;
    }
1374248
def _get_metadata_for_region(region_code):
    """"""
    country_calling_code = country_code_for_region(region_code)
    main_country = region_code_for_country_code(country_calling_code)
    # Set to a default instance of the metadata. This allows us to
    # function with an incorrect region code, even if formatting only
    # works for numbers specified with "+".
    return PhoneMetadata.metadata_for_region(main_country, _EMPTY_METADATA)
22331
private boolean readFormatRegion1(QrCode qr) {
//		if( qr.ppRight.get(0).distance(988.8,268.3) < 30 )
//			System.out.println("tjere");
//		System.out.println(qr.ppRight.get(0));

		// set the coordinate system to the closest pp to reduce position errors
		gridReader.setSquare(qr.ppRight,(float)qr.threshRight);

		bits.resize(15);
		bits.zero();
		for (int i = 0; i < 8; i++) {
			read(i,8,6-i);
		}

		gridReader.setSquare(qr.ppDown,(float)qr.threshDown);

		for (int i = 0; i < 6; i++) {
			read(i+8,i,8);
		}

		return true;
	}
61846
public final ValueWithPos<String> formatMs(final ValueWithPos<String> pphoneNumber) {
    return valueWithPosDefaults(this.formatMsWithPos(this.parsePhoneNumber(pphoneNumber)),
        pphoneNumber);
  }
305564
public ValueWithPos<PhoneNumberData> parsePhoneNumber(final ValueWithPos<String> pphoneNumber) {
    return this.parsePhoneNumber(pphoneNumber, new PhoneNumberData(), defaultCountryData);
  }
805021
public PhoneNumberInterface parsePhoneNumber(final String pphoneNumber,
      final PhoneNumberInterface pphoneNumberData, final PhoneCountryData pcountryData) {
    if (pphoneNumber == null) {
      return null;
    }
    final ValueWithPos<PhoneNumberData> formatedValue =
        this.parsePhoneNumber(new ValueWithPos<>(pphoneNumber, -1), pphoneNumberData, pcountryData);
    return formatedValue.getValue();
  }
831969
public static function getExampleNumber(string $regionCode, int $phoneNumberType = PhoneNumberType::FIXED_LINE) : PhoneNumber
    {
        $phoneNumber = PhoneNumberUtil::getInstance()->getExampleNumberForType($regionCode, $phoneNumberType);

        if ($phoneNumber === null) {
            throw new PhoneNumberException('No example number is available for the given region and type.');
        }

        return new PhoneNumber($phoneNumber);
    }
451349
public final ValueWithPos<String> formatUrl(final ValueWithPos<String> pphoneNumber) {
    return valueWithPosDefaults(this.formatUrlWithPos(this.parsePhoneNumber(pphoneNumber)),
        pphoneNumber);
  }
367986
protected function getCountryNameForNumber(PhoneNumber $number, $locale)
    {
        $regionCodes = $this->phoneUtil->getRegionCodesForCountryCode($number->getCountryCode());

        if (count($regionCodes) === 1) {
            return $this->getRegionDisplayName($regionCodes[0], $locale);
        }

        $regionWhereNumberIsValid = 'ZZ';
        foreach ($regionCodes as $regionCode) {
            if ($this->phoneUtil->isValidNumberForRegion($number, $regionCode)) {
                // If the number has already been found valid for one region, then we don't know which
                // region it belongs to so we return nothing.
                if ($regionWhereNumberIsValid !== 'ZZ') {
                    return '';
                }
                $regionWhereNumberIsValid = $regionCode;
            }
        }

        return $this->getRegionDisplayName($regionWhereNumberIsValid, $locale);
    }
233415
@GET
  @Path(PhoneNumber.PARSE_AND_FORMAT)
  public PhoneNumberDataWithFormats parseAndFormatPhoneNumber(
      @QueryParam(Parameters.LANGUAGE) final String planguage,
      @QueryParam(Parameters.COUNTRY) final String pcountry,
      @QueryParam(Parameters.PHONE_NUMBER) final String pphoneNumber) {
    final PhoneNumberDataWithFormats result = new PhoneNumberDataWithFormats(phoneNumberUtil
        .parsePhoneNumber(pphoneNumber, pcountry, LocaleUtil.convertLanguageToLocale(planguage)));
    result.setCommonInternational(phoneNumberUtil.formatCommonInternational(result));
    result.setCommonNational(phoneNumberUtil.formatCommonNational(result));
    result.setDin5008International(phoneNumberUtil.formatDin5008International(result));
    result.setDin5008National(phoneNumberUtil.formatDin5008National(result));
    result.setE123International(phoneNumberUtil.formatE123International(result));
    result.setE123National(phoneNumberUtil.formatE123National(result));
    result.setMs(phoneNumberUtil.formatMs(result));
    result.setUrl(phoneNumberUtil.formatUrl(result));
    return result;
  }
727048
public final ValueWithPos<String> formatRfc3966WithPos(final ValueWithPos<String> pphoneNumber,
      final String pcountryCode) {
    return valueWithPosDefaults(
        this.formatRfc3966WithPos(this.parsePhoneNumber(pphoneNumber, pcountryCode)), pphoneNumber);
  }
127512
@Override
    public ResourceSet<AvailablePhoneNumberCountry> read(final TwilioRestClient client) {
        return new ResourceSet<>(this, client, firstPage(client));
    }
964685
public final void setCountry(final Countries pCountry) {
    this.country = pCountry;
    if (this.itsId == null) {
      this.itsId = new IdLangPreferences();
    }
    this.itsId.setCountry(this.country);
  }
217696
public static CountryList getCountries(Context context) {
        if (mCountries != null) {
            return mCountries;
        }
        mCountries = new CountryList();
        try {
            JSONArray countries = new JSONArray(getJsonFromRaw(context, R.raw.countries));
            for (int i = 0; i < countries.length(); i++) {
                try {
                    JSONObject country = (JSONObject) countries.get(i);
                    mCountries.add(new Country(country.getString("name"), country.getString("iso2"), country.getInt("dialCode")));
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return mCountries;
    }
636445
public final ValueWithPos<String> formatE123National(final ValueWithPos<String> pphoneNumber) {
    return valueWithPosDefaults(this.formatE123NationalWithPos(this.parsePhoneNumber(pphoneNumber)),
        pphoneNumber);
  }
1221559
public final ValueWithPos<String> formatDin5008(final ValueWithPos<String> pphoneNumber) {
    return valueWithPosDefaults(
        this.formatDin5008WithPos(this.parsePhoneNumber(pphoneNumber), defaultCountryData),
        pphoneNumber);
  }