--- i18n.module	2007-10-30 19:12:35.000000000 +0200
+++ i18n.module.php	2008-02-04 02:13:26.000000000 +0200
@@ -281,7 +281,27 @@ function i18n_admin_settings() {
     '#options' => array(t('Disabled'), t('Enabled' )),
     '#description' => t("User browser language for home page and links without language prefix."),
   );
-
+  // Language prefix
+  $form['prefix'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Language prefix settings for default language'),
+    '#collapsible' => TRUE,
+    '#collapsed' => FALSE,
+  );
+  $form['prefix']['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."),
+  );
+  $form['prefix']['i18n_prefix_frontpage'] = array(
+    '#type' => 'radios',
+    '#title' => t('Omit the language prefix for frontpage when using the default language'),
+    '#default_value' => variable_get('i18n_prefix_frontpage', 0),
+    '#options' => array(t('Disabled'), t('Enabled' )),
+    '#description' => t('Omit the language prefix for frontpage when using the default language'),
+  );
   // Language icons
   $form['icons'] = array(
     '#type' => 'fieldset',
@@ -505,6 +525,13 @@ function i18n_get_normal_path($path) {
  */
 function i18n_path($path, $lang) {
   if (!$path || $path == i18n_frontpage($lang)) {
+    if (variable_get('i18n_prefix_frontpage', 0)) {
+      $default_lang = key(_i18n_locale_supported_languages());
+      // Omnot language prefix for frontpage when using the default language
+      if ($lang == $default_lang) {
+        return $path;
+      }
+    }
     return $lang;
   } elseif($alias = drupal_lookup_path('alias', $path)) {
 	  if($prefix = i18n_get_lang_prefix($alias)) {
@@ -699,14 +726,22 @@ if(!function_exists('custom_url_rewrite'
   function custom_url_rewrite($type, $path, $original) {
     return i18n_url_rewrite($type, $path, $original);
   }
-}
+}

 /**
  * Rewrites path with current language and removes prefix if searching for source path
  */
 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);
