<?php
// $Id: ireland_372_1.cif,v 1.4.2.1 2010-11-02 06:42:17 tr Exp $

// Note: Ireland does not currently have postal codes but it has been announced
// that they will be implemented - so I left the postal code in the address definition.
// http://www.dcmnr.gov.ie/Press+Releases/Dempsey+announces+programme+to+introduce+postcodes+in+Ireland+by+1st+January+2008.htm
// 

function ireland_install() {
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  db_query("INSERT INTO {uc_countries} VALUES ('372', 'Ireland', 'IE', 'IRL', 1)");

  // VALUES = %d for ID, Parent Country ID, Zone Abbreviation, Zone Name
  db_query("INSERT INTO {uc_zones} VALUES "
          ."(%d, 372, 'CARLOW', 'Co. Carlow'),"
          ."(%d, 372, 'CAVAN', 'Co. Cavan'),"
          ."(%d, 372, 'CLARE', 'Co. Clare'),"
          ."(%d, 372, 'CORK', 'Co. Cork'),"
          ."(%d, 372, 'DONEGAL', 'Co. Donegal'),"
          ."(%d, 372, 'DUBLIN', 'Co. Dublin'),"
          ."(%d, 372, 'GALWAY', 'Co. Galway'),"
          ."(%d, 372, 'KERRY', 'Co. Kerry'),"
          ."(%d, 372, 'KILDARE', 'Co. Kildare'),"
          ."(%d, 372, 'KILKENNY', 'Co. Kilkenny'),"
          ."(%d, 372, 'LAOIS', 'Co. Laois'),"
          ."(%d, 372, 'LEITRIM', 'Co. Leitrim'),"
          ."(%d, 372, 'LIMERICK', 'Co. Limerick'),"
          ."(%d, 372, 'LONGFORD', 'Co. Longford'),"
          ."(%d, 372, 'LOUTH', 'Co. Louth'),"
          ."(%d, 372, 'MAYO', 'Co. Mayo'),"
          ."(%d, 372, 'MEATH', 'Co. Meath'),"
          ."(%d, 372, 'MONAGHAN', 'Co. Monaghan'),"
          ."(%d, 372, 'OFFALY', 'Co. Offaly'),"
          ."(%d, 372, 'ROSCOMMON', 'Co. Roscommon'),"
          ."(%d, 372, 'SLIGO', 'Co. Sligo'),"
          ."(%d, 372, 'TIPPERARY', 'Co. Tipperary'),"
          ."(%d, 372, 'WATERFORD', 'Co. Waterford'),"
          ."(%d, 372, 'WESTMEATH', 'Co. Westmeath'),"
          ."(%d, 372, 'WEXFORD', 'Co. Wexford'),"
          ."(%d, 372, 'WICKLOW', 'Co. Wicklow')", uc_get_zone_ids(26));

  uc_set_address_format(372,
    "!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
   ."\r\n!city, !zone_code !postal_code\r\n!country_name_if");
}
