Implement default language for node aliases, or better, expose a way to
generate aliases for _All_ languages.

You can read the details of the issue here:
  http://drupal.org/node/321848

NOTE: if the user choose "Language Neutral" behaviour, but a language-specific
pattern is set for a given node type, the latter will be used. This addresses
some comments from other users.

Now I am even more convinced that the UI for this one should be a checkbox and
not a list of language, we want to modify the behaviour of alias creation only
when a language-specific alias is missing.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>

Index: pathauto/pathauto.admin.inc
===================================================================
--- pathauto.orig/pathauto.admin.inc
+++ pathauto/pathauto.admin.inc
@@ -144,6 +144,17 @@
     '#description' => t('Words to strip out of the URL alias, separated by commas. Do not place punctuation in here and do not use WYSIWYG editors on this field.'),
   );
 
+  if (module_exists('locale')) {
+    $languages = array('' => t('Language neutral')) + locale_language_list('native');
+    $form['general']['pathauto_lang_save'] = array(
+      '#type' => 'select',
+      '#title' => t('Default alias language for nodes'),
+      '#description' => t('Language Neutral setting will be ignored if a language-specific pattern is set for the node type.'),
+      '#default_value' => variable_get('pathauto_lang_save', language_default()->language),
+      '#options' => $languages
+    );
+  }
+
   $form['punctuation'] = array(
     '#type' => 'fieldset',
     '#weight' => $group_weight,
Index: pathauto/pathauto.module
===================================================================
--- pathauto.orig/pathauto.module
+++ pathauto/pathauto.module
@@ -241,7 +241,13 @@
           if (!isset($node->pathauto_perform_alias) || $node->pathauto_perform_alias) {
             $placeholders = pathauto_get_placeholders('node', $node);
             $src = "node/$node->nid";
-            $alias = pathauto_create_alias('node', $op, $placeholders, $src, $node->nid, $node->type, $node->language);
+
+            $_lang = $node->language;
+            if (! variable_get('pathauto_'. 'node' .'_'. $node->type .'_'. $node->language .'_pattern', '')) {
+              $_lang = variable_get('pathauto_lang_save', $node->language);
+            }
+
+            $alias = pathauto_create_alias('node', $op, $placeholders, $src, $node->nid, $node->type, $_lang);
           }
         }
         break;
Index: pathauto/pathauto_node.inc
===================================================================
--- pathauto.orig/pathauto_node.inc
+++ pathauto/pathauto_node.inc
@@ -112,7 +112,13 @@
       }
       $placeholders = pathauto_get_placeholders('node', $node);
       $src = "node/$node->nid";
-      if (pathauto_create_alias('node', 'bulkupdate', $placeholders, $src, $node->nid, $node->type, $node->language)) {
+
+      $_lang = $node->language;
+      if (! variable_get('pathauto_'. 'node' .'_'. $node->type .'_'. $node->language .'_pattern', '')) {
+        $_lang = variable_get('pathauto_lang_save', $node->language);
+      }
+
+      if (pathauto_create_alias('node', 'bulkupdate', $placeholders, $src, $node->nid, $node->type, $_lang)) {
         $count++;
       }
     }
