Index: i18n.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/i18n/i18n.module,v
retrieving revision 1.36.2.16.2.1
diff -u -p -r1.36.2.16.2.1 i18n.module
--- i18n.module	4 Dec 2007 20:17:44 -0000	1.36.2.16.2.1
+++ i18n.module	15 Jan 2008 03:11:49 -0000
@@ -282,6 +282,13 @@ function i18n_admin_settings() {
     '#options' => array(t('Disabled'), t('Enabled' )),
     '#description' => t("User browser language for home page and links without language prefix."),
   );
+  $form['i18n_prefix_default'] = array(
+    '#type' => 'radios',
+    '#title' => t('Prefix paths with the default 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 default language.  Some established sites may wish to disable this when enabling i18n."),  
+  );
   
   // Language icons
   $form['icons'] = array(
@@ -707,7 +714,15 @@ if(!function_exists('custom_url_rewrite'
  */
 function i18n_url_rewrite($type, $path, $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;
   } elseif ($type == 'source') {
     if ($path == $original) {
       return i18n_get_normal_path($path);
