Irish county codes for forms and autocomplete functionality
I Just submitted a patch for the Drupal eCommerce which included a localisation patch for Irish counties - so autocomplete forms work when a customer from the Island of Ireland is selecting their county (state).
This is by no means an official list. It's a list I compiled myself using the county codes from car registration plates as the basis.
If anyone knows of an official county code list for Ireland, please post a reply up here.
Code County Province ----------------------------------- AM Antrim Ulster AH Armagh Ulster C Cork Munster CE Clare Munster CN Cavan Ulster CW Carlow Leinster D Dublin Leinster DL Donegal Ulster DN Down Ulster DY Derry Ulster FH Fermanagh Ulster GW Galway Connacht KE Kildare Leinster KK Kilkenny Leinster KY Kerry Munster LD Longford Leinster LH Louth Leinster LK Limerick Munster LM Leitrim Connacht LS Laois Leinster MH Meath Leinster MN Monaghan Ulster MO Mayo Connacht OY Offaly Leinster RN Roscommon Connacht SO Sligo Connacht TE Tyrone Ulster TN Tipperary N Munster TS Tipperary S Munster WD Waterford Munster WH Westmeath Leinster WW Wicklow Leinster WX Wexford Leinster
Note: I notice on some sites I'm involved with there is an increase in people choosing Ireland instead of the UK as their country along with their postcode (particularly following when the United Kingdom was devolved - Northern Ireland assembly came together 8th may 2007) , so, NI counties are included to encompass Antrim, Armagh, Down, Derry, Fermanagh and Tyrone.
I have attached a county code array in a TXT file to make it easier to copy across the list of codes and counties.
cheers
dub

Wikipedia?
http://en.wikipedia.org/wiki/Counties_of_Ireland
I don't know how eCommerce works, but there's a module that implements the list of all countries and provinces/states/territories in the world (or at least they claim that :), and maybe they could also add support for counties:
http://drupal.org/project/addresses
ARGH
In an ecommerce context can someone explain to me why ON EARTH the list would include six counties whose postal addresses are not served by An Post? And which exist in the UK postcode file? And which are understood by every postal service on Earth to not be part of Ireland?
Other than listing GAA clubs I can't imagine a website where this file wouldn't be considered harmful.
some background...
The quick answer is because I've noticed it causes problems on ecommerce sites, particularly sites servicing customers on the Island of Ireland.
For example, if a customer from Northern Ireland chooses the UK as their country, they won't see the list of counties in the autocomplete field. However, if they don't choose the UK as their country (which is what I have noticed with many NI customers) there is no county list for them to choose from...which can stall the order if state/county is a required field..
those six counties are served by An Post, via royal mail and are also served by courier companies. They have been for decades.
Do you honestly think that An Post would refuse to pass on an order to Royal Mail in Northern Ireland because the label was addressed County Armagh, Ireland? Or that the Royal Mail (who requires the county if the postcode hasn't been provided) would collapse from confusion if An Post forwarded on a parcel like that?
They are simply stamped with the words "Northern Ireland" at the An Post sorting office and moved along.
I've worked with a lot of ecommerce sites servicing customers from the Island of Ireland, online music shops in particular and I have observed many orders from NI that are addressed as Ireland and I have never heard of the deliveries not getting through.
It's plausible there maybe a delay in an international delivery going through Dublin, rather than London, but, I imagine An Post, Royal Mail and couriers are well used to it.
Also if you check out the new PON (GPS based postcodes) system that was recently launched in Ireland (very popular with couriers, by the way, because it's more accurate than regular UK style postcodes), Their GPS postcode system covers all counties on the Island of Ireland, i.e. the "domestic" counties include the six counties that make up the Northern Ireland region.
http://www.irishpostcodes.ie
It will take a few years for the new Irish postcode system to take hold and reach a point where everyone will know off the top of their head what their postcode is, so, the above list of counties is just a helper to make life easier for customers from the Island of Ireland on an ecommerce site....and for the commerce site to handle the order.
This: those six counties are
This:
...is in direct logical opposition to this:
As you correctly point out, An Post does not handle mail for the North. It sends that mail to the UK instead, and the process of mis-addressing adds several days to the delivery time.
IMHO by incorrectly pretending that this isn't so, you're encouraging something (at significant annoyance to potential customers, and possibly also at nonzero cost to customers) which should instead be actively discouraged.
If your issue is that these six counties don't appear in the UK autocomplete list, surely a more logical approch would be to patch the UK country file instead? In that case, we also don't start getting people bogged down in requiring or not-requiring postcodes incorrectly based on country of delivery.
I think the last thing we need is to inadvertently cause Drupal-based shops across the planet to mistakenly start shipping things to the wrong country entirely. I don't much care whether people should or shouldn't consider Ireland and Northern Ireland to be the same thing. The fact is that right now they bloody aren't, and pretending otherwise causes measurable harm to the app and to customers.
LOL
The Irish postal company (An Post) sends parcels destined for Northern Ireland straight to the sorting office in Belfast, Handelaar. That's the same sorting office a parcel destined for NI would arrive at if it came through London.....
LOL
I would tend to look at this in an ecommerce/customer perspective.
Why? Because the customer is always right and given a choice, I would prefer not to offend a customer or stall an ecommerce order...hence the county list as presented.
The source of the patch was from experience with ecommerce sites servicing customers resident in those six counties and the issue isn't that the counties aren't listed in the UK autocomplete list (most of the major ecommerce sites, like Amazon, include Northern Ireland as a country now) the issue is that they aren't on the autocomplete list for Ireland - the way ecommerce works is that the county/state list is loaded based on the country selection. Not the other way around.
So it's impossible someone could choose the wrong country based on a county selection.
Thanks for outing yourself
Thanks for outing yourself as nothing but a noise troll by titling that comment "LOL", by the way. I'm less inclined to believe that this is somehow not politically-motivated when it's you, since this isn't the first time you've tried to incorrectly shoehorn the North into Ireland for no good reason. I think the last time was with location.module.
The difference being that they won't get held up as misaddressed mail if they go trough London.
Your position seems to be that Drupal's official stance should be that we deliberately send parcels to the wrong country on the assumption that An Post will eventually send them up the road?
Amazon has business logic which would interpret that user-entered data and correct it. You do not. Come up with patches which actually handle things like Amazon does -- namely, to require a postcode and append 'UK' to the label if an address is entered from NI -- and we're all fine.
But this is breakage.
wow
I'm sorta sorry I brought up this topic. I really thought this sort of bickering was a thing of the past.
I'm not sure where exactly you're coming from handelaar.. but, if you're referring to Alan Burkes update to the location.module, I don't recall being involved in that discussion. Ironically, I notice you were.
You're also incorrect about Drupals official stance and deliberately sending parcels to the wrong country. Did you even read my thread discussion starter? I have permission to commit patches for the ecommerce modules, so if your absurd "politically motivated" theory was correct, wouldn't I have already comitted it, rather than open it up for sensible discussion?
The proposed patch for ecommerce was to include Ireland in the strore localisation.inc file for that module and the addition of the six counties was as a 'catch all' inclusion to cater for customers who prefer to use Ireland instead of the UK in their address. I can't believe you have a problem with that. I thought this sort of bickering was a thing of the past.
You're also incorrect about amazons ecommerce system logic. It doesn't correct user entered data. They patched their include files (they use Mason CMS, by the way) to include a seperate country to the UK called Northern Ireland in their country list.
If you have a problem with that as well, can I suggest you take it up with Amazon?
Having looked into it a little when creating the proposed patch for ecommerce, you might also want to get on to the people behind http://www.irishpostcodes.ie who have created a whole new set of GPS based postcodes for the Island of Ireland (including the 6 counties).
It is remarkable how accurate and efficient their postcode system is compared to the existing system for Northern Ireland. Check out this article about postcodes in northern ireland and compare their efficiency to those at http://www.irishpostcodes.ie