In address.inc, the array that defines the administrative areas for Spain has two entries for the same administrative area: Baleares.

Line 331: 'PM' => t('Baleares'),
Line 349: 'PM' => t("Islas Baleares"),

One of these needs to be eliminated. My preference would be to eliminate "Baleares", and keep "Islas Baleares". This would allow an autocomplete field to find the province regardless of whether the user begins typing "Baleares" or "Islas".

Comments

bojanz’s picture

Status: Active » Fixed

I've removed Islas Baleares because according to https://en.wikipedia.org/wiki/ISO_3166-2:ES the name of the "PM" subdivision is just "Baleares", while "Islas Baleares" has the code "IB" (but isn't included in our dataset?)

This information is inconsistent with Google's dataset (which specifies Islas Baleares), so I will check with them.

sja1’s picture

Actually, both the document you reference, and this one: http://www.iso.org/iso/iso_3166-2_newsletter_ii-1_corrected_2010-02-19.pdf
Indicate that ES-PM was changed to "Balears", which is the Catalán variant of the name.

I've looked through the code, and it seems to me that when geocoder is configured with addressfield and using google to geocode, it is passing the province code ('PM' for example) and not the province name to google. So, as long as Google knows how to interpret the ISO codes, then the codes shouldn't cause a problem with the geocoding.

On the other hand, the province name is what the end user is going to use to select a province. Province codes, as you may know, are rarely used by the general public in Spain. From this viewpoint, it would be better in the case of the names to not use the official ISO values.

As mentioned above, ISO has decided that "Balears" is the official name. However, within Spain Baleares is used much more often than Balears as a search term, as you can see here in google trends:
http://www.google.com/trends/explore#q=balears%2C%20baleares&geo=ES&date...

So from a useability standpoint, it would be much better for the name to be "Baleares", or perhaps "Baleares / Balears". But you could even argue for "Islas Baleares / Illes Balears", so that an autocomplete widget or other search configured to find matches inside the string would find this tag regardless of whether the user started typing Baleares, Balears, Islas or Illes.

bojanz’s picture

Title: Duplicate administrative area defined for Baleares (Spain) » Revisit label for Baleares (Spain)
Status: Fixed » Active

Okay, retitling issue, I will come back to this.