Index: i18n/i18n.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/i18n/Attic/i18n.inc,v retrieving revision 1.23.2.4 diff -u -p -r1.23.2.4 i18n.inc --- i18n/i18n.inc 30 Nov 2006 17:18:33 -0000 1.23.2.4 +++ i18n/i18n.inc 11 Jan 2008 04:02:44 -0000 @@ -27,7 +27,15 @@ if(!function_exists('custom_url_rewrite' function i18n_url_rewrite($type, $path, $original){ //drupal_set_message("type=$type path=$path original=$original"); if ($type == 'alias' && !i18n_get_lang_prefix($path) ){ - return $path ? i18n_get_lang() . '/'. $path : i18n_get_lang(); + $lang = i18n_get_lang(); + if (!variable_get('i18n_prefix_default', 1)) { + $default_lang = key(_i18n_locale_supported_languages()); + // Don't use a prefix for the default language + if ($lang == $default_lang) { + return $path; + } + } + return $path ? $lang . '/'. $path : $lang; } else { return $path; } Index: i18n/i18n.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/i18n/i18n.module,v retrieving revision 1.30.2.1 diff -u -p -r1.30.2.1 i18n.module --- i18n/i18n.module 5 Aug 2006 15:19:41 -0000 1.30.2.1 +++ i18n/i18n.module 11 Jan 2008 04:02:44 -0000 @@ -138,9 +138,15 @@ function i18n_settings() { '#title' => t('Browser language detection'), '#default_value' => variable_get('i18n_browser', 0), '#options' => array(t('Disabled'), t('Enabled' )), - '#description' => t('A description of this setting.'), + '#description' => t("Try to detect the language based on the information from the user's browser."), + ); + $form['i18n_prefix_default'] = array( + '#type' => 'radios', + '#title' => t('Prefix paths with the defualt language'), + '#default_value' => variable_get('i18n_prefix_default', 1), + '#options' => array(t('Disabled'), t('Enabled' )), + '#description' => t("Add a language prefix to Drupal paths when the current language is the defualt language. Some established sites may wish to disable this when enabling i18n."), ); - // Language icons $form['icons'] = array( '#type' => 'fieldset',