kyrgyzstan_417_1.cif 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. function kyrgyzstan_install() {
  3. // Make the entry in the country table.
  4. // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  5. db_insert('uc_countries')
  6. ->fields(array(
  7. 'country_id' => 417,
  8. 'country_name' => 'Kyrgyzstan',
  9. 'country_iso_code_2' => 'KG',
  10. 'country_iso_code_3' => 'KGZ',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(417, 'KG-GB', 'Bishkek'),
  17. array(417, 'KG-B', 'Batken'),
  18. array(417, 'KG-C', 'Chü'),
  19. array(417, 'KG-J', 'Jalal-Abad'),
  20. array(417, 'KG-N', 'Naryn'),
  21. array(417, 'KG-O', 'Osh'),
  22. array(417, 'KG-T', 'Talas'),
  23. array(417, 'KG-Y', 'Ysyk-Köl'),
  24. );
  25. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  26. foreach ($zones as $zone) {
  27. $query->values($zone);
  28. }
  29. $query->execute();
  30. // Set address format
  31. uc_set_address_format(
  32. 417,
  33. "!company\r\n".
  34. "!first_name !last_name\r\n".
  35. "!street1\r\n".
  36. "!street2\r\n".
  37. "!city, !zone_name !postal_code\r\n".
  38. "!country_name_if"
  39. );
  40. }