Closed KES777 closed 6 years ago
The iso_code
method on a country object returns an ISO 3166-1 country code. As such, it will return GB for an IP in Scotland. As you note, Scotland is considered an ISO 3166-2 subdivision and will be the first subdivision of the list returned by ->subdivisions
.
Three letter country codes are not provided.
I check subdivisions and I am ambiguous:
$subdivision_rec->iso_code() This returns a string up to three characters long contain the subdivision portion of the ISO 3166-2 code
But you say:
Three letter country codes are not provided.
I was referring to ISO 3166-1 countries, which Scotland is not. It is an ISO 3166-2 subdivision. The subdivision codes vary in length between countries.
It is not clean from the doc how next method:
will deal with Scotland country https://en.wikipedia.org/wiki/ISO_3166-2:GB#Countries_and_province
Is it possible to get three letter country? or its code?
It also worth to show in synopsis or examples the result of expression: