belarus_112_1.cif 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. function belarus_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' => 112,
  8. 'country_name' => 'Belarus',
  9. 'country_iso_code_2' => 'BY',
  10. 'country_iso_code_3' => 'BLR',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(112, 'BR', 'Brest'),
  17. array(112, 'HO', 'Homyel'),
  18. array(112, 'HM', 'Horad Minsk'),
  19. array(112, 'HR', 'Hrodna'),
  20. array(112, 'MA', 'Mahilyow'),
  21. array(112, 'MI', 'Minsk'),
  22. array(112, 'VI', 'Vitsyebsk'),
  23. );
  24. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  25. foreach ($zones as $zone) {
  26. $query->values($zone);
  27. }
  28. $query->execute();
  29. // Set address format
  30. uc_set_address_format(
  31. 112,
  32. "!company\r\n".
  33. "!first_name !last_name\r\n".
  34. "!street1\r\n".
  35. "!street2\r\n".
  36. "!city, !zone_name !postal_code\r\n".
  37. "!country_name_if"
  38. );
  39. }