Taiwan CIF file

Posts: 4
Joined: 01/20/2008

I created the attached CIF file for Taiwan.

The cities listed are in both English and Chinese to give customers the option of entering their address in either language.

I will work on a version for China and will post it as soon as it's completed.

-W

AttachmentSize
taiwan_158_1.cif3.21 KB
Posts: 3744
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Awesome. Smiling Will test and commit this morning if possible.

(I'm going to have to assume that the Chinese characters will display properly on the appropriate browser... for me they just show up as ???.)

Posts: 4
Joined: 01/20/2008

Ryan,

I did not see any problems with the Chinese characters from my macbook via the Safari, Firefox 2, Camino and Opera browsers. If you're using Windows, I believe you have to install the Asian language pack to be able to display Chinese Characters. I will confirm this later at home as all the PCs I use at work have the Asian language pack installed.

-w

Posts: 3744
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

No sweat. I added it in and assumed it works fine if you posted it up as complete. Smiling

Posts: 4
Joined: 01/20/2008

yes sir. It's complete and the question marks only shows up on XP machine that does not have the East-Asian language pack installed.

Posts: 7
Joined: 02/29/2008
Posts: 2
Joined: 03/25/2008

Huh? I clicked the " tawan_158_1.cif file " then many words come out =.= .. i want to download it !! >.< i wanna play nostale tawain.. but i cannot understand .. hw?

Posts: 2
Joined: 03/25/2008

<?php
// $Id$

/**
* First implement hook_install() using the name of the country as the base of
* the function name.
*/
function taiwan_install() {
 
// Make the entry in the country table.
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
 
db_query("INSERT INTO {uc_countries} VALUES (158, 'Taiwan', 'TW', 'TWN', 1)");

 
// Make the entries in the zones table.  Use %d for the zone_id and the
  // function uc_get_zone_ids($num) as the second argument for db_query() where
  // $num is the number of zones in the INSERT query.
  // VALUES = %d for ID, Parent Country ID, Zone Abbreviation, Zone Name
 
db_query("INSERT INTO {uc_zones} VALUES "
         
."(%d, 158, '01', 'ChangHua County'),"
         
."(%d, 158, '02', 'ChiaYi City'),"
         
."(%d, 158, '03', 'ChiaYi County'),"
         
."(%d, 158, '04', 'HsinChu City'),"
         
."(%d, 158, '05', 'HsinChu County'),"
         
."(%d, 158, '06', 'HuaLien County'),"
         
."(%d, 158, '07', 'KaoHsiung City'),"
         
."(%d, 158, '08', 'KaoHsiung County'),"
         
."(%d, 158, '09', 'KeeLung City '),"
         
."(%d, 158, '10', 'KinMen County'),"
         
."(%d, 158, '11', 'LienChiang County'),"
         
."(%d, 158, '12', 'MiaoLi County'),"
         
."(%d, 158, '13', 'NanHai'),"
         
."(%d, 158, '14', 'NanTou County'),"
         
."(%d, 158, '15', 'PengHu County'),"
         
."(%d, 158, '16', 'PingTung County'),"
         
."(%d, 158, '17', 'TaiChung City'),"
         
."(%d, 158, '18', 'TaiChung County'),"
         
."(%d, 158, '19', 'TaiNan City'),"
         
."(%d, 158, '20', 'TaiNan County'),"
         
."(%d, 158, '21', 'Taipei City'),"
         
."(%d, 158, '22', 'Taipei County'),"
         
."(%d, 158, '23', 'TaiTung County'),"
         
."(%d, 158, '24', 'TaoYuan County'),"
         
."(%d, 158, '25', 'Yilan County'),"
         
."(%d, 158, '26', 'YunLin County'),"
         
."(%d, 158, '27', '南投縣'),"
         
."(%d, 158, '28', '南海諸島'),"
         
."(%d, 158, '29', '嘉義市'),"
         
."(%d, 158, '30', '嘉義縣'),"
         
."(%d, 158, '31', '基隆市'),"
         
."(%d, 158, '32', '宜蘭縣'),"
         
."(%d, 158, '33', '屏東縣'),"
         
."(%d, 158, '34', '彰化縣'),"
         
."(%d, 158, '35', '新竹市'),"
         
."(%d, 158, '36', '新竹縣'),"
         
."(%d, 158, '37', '桃園縣'),"
         
."(%d, 158, '38', '澎湖縣'),"
         
."(%d, 158, '39', '臺中市'),"
         
."(%d, 158, '40', '臺中縣'),"
         
."(%d, 158, '41', '臺北市'),"
         
."(%d, 158, '42', '臺北縣'),"
         
."(%d, 158, '43', '臺南市'),"
         
."(%d, 158, '44', '臺南縣'),"
         
."(%d, 158, '45', '臺東縣'),"
         
."(%d, 158, '46', '花蓮縣'),"
         
."(%d, 158, '47', '苗栗縣'),"
         
."(%d, 158, '48', '連江縣'),"
         
."(%d, 158, '49', '金門縣'),"
         
."(%d, 158, '50', '雲林縣'),"
         
."(%d, 158, '51', '高雄市'),"
         
."(%d, 158, '52', '高雄縣')", uc_get_zone_ids(52));

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

function
taiwan_update($version) {
}


function
taiwan_uninstall() {
}
?>

IT APPEARS LIKE THIS KK??

Posts: 3744
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Umm... chill out? Sticking out tongue This file is included in Ubercart. Make sure you have beta 7 installed and go to /admin/store/settings/countries/edit where you can enable Taiwan.

To download that file, btw, you would simply have to right click the link and choose to "Save as..." Eye-wink