Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.142
diff -u -p -r1.142 install.php
--- install.php	10 Nov 2008 05:22:56 -0000	1.142
+++ install.php	12 Nov 2008 10:50:40 -0000
@@ -1016,6 +1016,7 @@ function install_task_list($active = NUL
  * Form API array definition for site configuration.
  */
 function install_configure_form(&$form_state, $url) {
+  include_once DRUPAL_ROOT . '/includes/country.inc';
 
   $form['intro'] = array(
     '#markup' => st('To configure your website, please provide the following information.'),
@@ -1079,6 +1080,16 @@ function install_configure_form(&$form_s
     '#title' => st('Server settings'),
     '#collapsible' => FALSE,
   );
+
+  $form['server_settings']['site_default_country'] = array(
+    '#type' => 'select',
+    '#title' => t('Default country'),
+    '#default_value' => variable_get('site_default_country', ''),
+    '#options' => country_get_list(),
+    '#description' => t('Select the default country for the site.'),
+    '#weight' => 0,
+  );
+
   $form['server_settings']['date_default_timezone'] = array(
     '#type' => 'select',
     '#title' => st('Default time zone'),
@@ -1151,6 +1162,7 @@ function install_configure_form_submit($
   variable_set('site_name', $form_state['values']['site_name']);
   variable_set('site_mail', $form_state['values']['site_mail']);
   variable_set('date_default_timezone', $form_state['values']['date_default_timezone']);
+  variable_set('site_default_country', $form_state['values']['site_default_country']);
 
   // Enable update.module if this option was selected.
   if ($form_state['values']['update_status_module'][1]) {
Index: includes/country.inc
===================================================================
RCS file: includes/country.inc
diff -N includes/country.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/country.inc	12 Nov 2008 10:50:40 -0000
@@ -0,0 +1,291 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Provides a list of countries based on ISO 3166-1 alpha-2.
+ */
+
+/**
+ * Get an array of all country code => country name pairs as layed out
+ * in ISO 3166-1 alpha-2 with the exception that on the ISO standard
+ * country codes are uppercased.
+ *
+ * Grabbed from location project (http://drupal.org/project/location).
+ * @return
+ *   An array of all country code => country name pairs.
+ */
+function _country_get_predefined_list() {
+  static $countries;
+
+  if (isset($countries)) {
+    return $countries;
+  }
+  $t = get_t();
+
+  $countries = array(
+    'ad' => $t('Andorra'),
+    'ae' => $t('United Arab Emirates'),
+    'af' => $t('Afghanistan'),
+    'ag' => $t('Antigua and Barbuda'),
+    'ai' => $t('Anguilla'),
+    'al' => $t('Albania'),
+    'am' => $t('Armenia'),
+    'an' => $t('Netherlands Antilles'),
+    'ao' => $t('Angola'),
+    'aq' => $t('Antarctica'),
+    'ar' => $t('Argentina'),
+    'as' => $t('American Samoa'),
+    'at' => $t('Austria'),
+    'au' => $t('Australia'),
+    'aw' => $t('Aruba'),
+    'ax' => $t('Aland Islands'),
+    'az' => $t('Azerbaijan'),
+    'ba' => $t('Bosnia and Herzegovina'),
+    'bb' => $t('Barbados'),
+    'bd' => $t('Bangladesh'),
+    'be' => $t('Belgium'),
+    'bf' => $t('Burkina Faso'),
+    'bg' => $t('Bulgaria'),
+    'bh' => $t('Bahrain'),
+    'bi' => $t('Burundi'),
+    'bj' => $t('Benin'),
+    'bm' => $t('Bermuda'),
+    'bn' => $t('Brunei'),
+    'bo' => $t('Bolivia'),
+    'br' => $t('Brazil'),
+    'bs' => $t('Bahamas'),
+    'bt' => $t('Bhutan'),
+    'bv' => $t('Bouvet Island'),
+    'bw' => $t('Botswana'),
+    'by' => $t('Belarus'),
+    'bz' => $t('Belize'),
+    'ca' => $t('Canada'),
+    'cc' => $t('Cocos (Keeling) Islands'),
+    'cd' => $t('Congo (Kinshasa)'),
+    'cf' => $t('Central African Republic'),
+    'cg' => $t('Congo (Brazzaville)'),
+    'ch' => $t('Switzerland'),
+    'ci' => $t('Ivory Coast'),
+    'ck' => $t('Cook Islands'),
+    'cl' => $t('Chile'),
+    'cm' => $t('Cameroon'),
+    'cn' => $t('China'),
+    'co' => $t('Colombia'),
+    'cr' => $t('Costa Rica'),
+    'cs' => $t('Serbia And Montenegro'),
+    'cu' => $t('Cuba'),
+    'cv' => $t('Cape Verde'),
+    'cx' => $t('Christmas Island'),
+    'cy' => $t('Cyprus'),
+    'cz' => $t('Czech Republic'),
+    'de' => $t('Germany'),
+    'dj' => $t('Djibouti'),
+    'dk' => $t('Denmark'),
+    'dm' => $t('Dominica'),
+    'do' => $t('Dominican Republic'),
+    'dz' => $t('Algeria'),
+    'ec' => $t('Ecuador'),
+    'ee' => $t('Estonia'),
+    'eg' => $t('Egypt'),
+    'eh' => $t('Western Sahara'),
+    'er' => $t('Eritrea'),
+    'es' => $t('Spain'),
+    'et' => $t('Ethiopia'),
+    'fi' => $t('Finland'),
+    'fj' => $t('Fiji'),
+    'fk' => $t('Falkland Islands'),
+    'fm' => $t('Micronesia'),
+    'fo' => $t('Faroe Islands'),
+    'fr' => $t('France'),
+    'ga' => $t('Gabon'),
+    'gd' => $t('Grenada'),
+    'ge' => $t('Georgia'),
+    'gf' => $t('French Guiana'),
+    'gg' => $t('Guernsey'),
+    'gh' => $t('Ghana'),
+    'gi' => $t('Gibraltar'),
+    'gl' => $t('Greenland'),
+    'gm' => $t('Gambia'),
+    'gn' => $t('Guinea'),
+    'gp' => $t('Guadeloupe'),
+    'gq' => $t('Equatorial Guinea'),
+    'gr' => $t('Greece'),
+    'gs' => $t('South Georgia and the South Sandwich Islands'),
+    'gt' => $t('Guatemala'),
+    'gu' => $t('Guam'),
+    'gw' => $t('Guinea-Bissau'),
+    'gy' => $t('Guyana'),
+    'hk' => $t('Hong Kong S.A.R., China'),
+    'hm' => $t('Heard Island and McDonald Islands'),
+    'hn' => $t('Honduras'),
+    'hr' => $t('Croatia'),
+    'ht' => $t('Haiti'),
+    'hu' => $t('Hungary'),
+    'id' => $t('Indonesia'),
+    'ie' => $t('Ireland'),
+    'il' => $t('Israel'),
+    'im' => $t('Isle of Man'),
+    'in' => $t('India'),
+    'io' => $t('British Indian Ocean Territory'),
+    'iq' => $t('Iraq'),
+    'ir' => $t('Iran'),
+    'is' => $t('Iceland'),
+    'it' => $t('Italy'),
+    'je' => $t('Jersey'),
+    'jm' => $t('Jamaica'),
+    'jo' => $t('Jordan'),
+    'jp' => $t('Japan'),
+    'ke' => $t('Kenya'),
+    'kg' => $t('Kyrgyzstan'),
+    'kh' => $t('Cambodia'),
+    'ki' => $t('Kiribati'),
+    'km' => $t('Comoros'),
+    'kn' => $t('Saint Kitts and Nevis'),
+    'kp' => $t('North Korea'),
+    'kr' => $t('South Korea'),
+    'kw' => $t('Kuwait'),
+    'ky' => $t('Cayman Islands'),
+    'kz' => $t('Kazakhstan'),
+    'la' => $t('Laos'),
+    'lb' => $t('Lebanon'),
+    'lc' => $t('Saint Lucia'),
+    'li' => $t('Liechtenstein'),
+    'lk' => $t('Sri Lanka'),
+    'lr' => $t('Liberia'),
+    'ls' => $t('Lesotho'),
+    'lt' => $t('Lithuania'),
+    'lu' => $t('Luxembourg'),
+    'lv' => $t('Latvia'),
+    'ly' => $t('Libya'),
+    'ma' => $t('Morocco'),
+    'mc' => $t('Monaco'),
+    'md' => $t('Moldova'),
+    'me' => $t('Montenegro'),
+    'mg' => $t('Madagascar'),
+    'mh' => $t('Marshall Islands'),
+    'mk' => $t('Macedonia'),
+    'ml' => $t('Mali'),
+    'mm' => $t('Myanmar'),
+    'mn' => $t('Mongolia'),
+    'mo' => $t('Macao S.A.R., China'),
+    'mp' => $t('Northern Mariana Islands'),
+    'mq' => $t('Martinique'),
+    'mr' => $t('Mauritania'),
+    'ms' => $t('Montserrat'),
+    'mt' => $t('Malta'),
+    'mu' => $t('Mauritius'),
+    'mv' => $t('Maldives'),
+    'mw' => $t('Malawi'),
+    'mx' => $t('Mexico'),
+    'my' => $t('Malaysia'),
+    'mz' => $t('Mozambique'),
+    'na' => $t('Namibia'),
+    'nc' => $t('New Caledonia'),
+    'ne' => $t('Niger'),
+    'nf' => $t('Norfolk Island'),
+    'ng' => $t('Nigeria'),
+    'ni' => $t('Nicaragua'),
+    'nl' => $t('Netherlands'),
+    'no' => $t('Norway'),
+    'np' => $t('Nepal'),
+    'nr' => $t('Nauru'),
+    'nu' => $t('Niue'),
+    'nz' => $t('New Zealand'),
+    'om' => $t('Oman'),
+    'pa' => $t('Panama'),
+    'pe' => $t('Peru'),
+    'pf' => $t('French Polynesia'),
+    'pg' => $t('Papua New Guinea'),
+    'ph' => $t('Philippines'),
+    'pk' => $t('Pakistan'),
+    'pl' => $t('Poland'),
+    'pm' => $t('Saint Pierre and Miquelon'),
+    'pn' => $t('Pitcairn'),
+    'pr' => $t('Puerto Rico'),
+    'ps' => $t('Palestinian Territory'),
+    'pt' => $t('Portugal'),
+    'pw' => $t('Palau'),
+    'py' => $t('Paraguay'),
+    'qa' => $t('Qatar'),
+    're' => $t('Reunion'),
+    'ro' => $t('Romania'),
+    'rs' => $t('Serbia'),
+    'ru' => $t('Russia'),
+    'rw' => $t('Rwanda'),
+    'sa' => $t('Saudi Arabia'),
+    'sb' => $t('Solomon Islands'),
+    'sc' => $t('Seychelles'),
+    'sd' => $t('Sudan'),
+    'se' => $t('Sweden'),
+    'sg' => $t('Singapore'),
+    'sh' => $t('Saint Helena'),
+    'si' => $t('Slovenia'),
+    'sj' => $t('Svalbard and Jan Mayen'),
+    'sk' => $t('Slovakia'),
+    'sl' => $t('Sierra Leone'),
+    'sm' => $t('San Marino'),
+    'sn' => $t('Senegal'),
+    'so' => $t('Somalia'),
+    'sr' => $t('Suriname'),
+    'st' => $t('Sao Tome and Principe'),
+    'sv' => $t('El Salvador'),
+    'sy' => $t('Syria'),
+    'sz' => $t('Swaziland'),
+    'tc' => $t('Turks and Caicos Islands'),
+    'td' => $t('Chad'),
+    'tf' => $t('French Southern Territories'),
+    'tg' => $t('Togo'),
+    'th' => $t('Thailand'),
+    'tj' => $t('Tajikistan'),
+    'tk' => $t('Tokelau'),
+    'tl' => $t('East Timor'),
+    'tm' => $t('Turkmenistan'),
+    'tn' => $t('Tunisia'),
+    'to' => $t('Tonga'),
+    'tr' => $t('Turkey'),
+    'tt' => $t('Trinidad and Tobago'),
+    'tv' => $t('Tuvalu'),
+    'tw' => $t('Taiwan'),
+    'tz' => $t('Tanzania'),
+    'ua' => $t('Ukraine'),
+    'ug' => $t('Uganda'),
+    'uk' => $t('United Kingdom'),
+    'um' => $t('United States Minor Outlying Islands'),
+    'us' => $t('United States'),
+    'uy' => $t('Uruguay'),
+    'uz' => $t('Uzbekistan'),
+    'va' => $t('Vatican'),
+    'vc' => $t('Saint Vincent and the Grenadines'),
+    've' => $t('Venezuela'),
+    'vg' => $t('British Virgin Islands'),
+    'vi' => $t('U.S. Virgin Islands'),
+    'vn' => $t('Vietnam'),
+    'vu' => $t('Vanuatu'),
+    'wf' => $t('Wallis and Futuna'),
+    'ws' => $t('Samoa'),
+    'ye' => $t('Yemen'),
+    'yt' => $t('Mayotte'),
+    'za' => $t('South Africa'),
+    'zm' => $t('Zambia'),
+    'zw' => $t('Zimbabwe'),
+  );
+
+  // Sort the list.
+  natcasesort($countries);
+
+  return $countries;
+}
+
+/**
+ * Get list of all predefined and custom countries.
+ *
+ * @return
+ *   An array of all country code => country name pairs.
+ */
+function country_get_list() {
+  $countries = _country_get_predefined_list();
+  // TODO: implement drupal_alter().
+  return $countries;
+}
+
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.104
diff -u -p -r1.104 system.admin.inc
--- modules/system/system.admin.inc	11 Nov 2008 22:39:59 -0000	1.104
+++ modules/system/system.admin.inc	12 Nov 2008 10:50:44 -0000
@@ -1194,6 +1194,9 @@ function system_ip_blocking_delete_submi
  * @see system_settings_form()
  */
 function system_site_information_settings() {
+  include_once DRUPAL_ROOT . '/includes/country.inc';
+  $countries = country_get_list();
+
   $form['site_name'] = array(
     '#type' => 'textfield',
     '#title' => t('Name'),
@@ -1242,6 +1245,13 @@ function system_site_information_setting
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
     '#required' => TRUE,
   );
+  $form['site_default_country'] = array(
+    '#type' => 'select',
+    '#title' => t('Default country'),
+    '#default_value' => variable_get('site_default_country', ''),
+    '#options' => $countries,
+    '#description' => t('Select the default country for the site.'),
+  );
   $form['#validate'][] = 'system_site_information_settings_validate';
 
   return system_settings_form($form);
