Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.263
diff -u -r1.263 locale.module
--- modules/locale/locale.module	13 Oct 2009 21:34:14 -0000	1.263
+++ modules/locale/locale.module	15 Oct 2009 16:37:21 -0000
@@ -1015,3 +1015,11 @@
   $form_state['redirect'] = 'admin/config/regional/date-time/locale';
 }
 
+function locale_comment_filter_info($node_type) {
+  return array('locale' => t('Filter by content language')); 
+}
+
+function locale_comment_filter(&$query) {
+  global $language;
+  $query->where("language = :name", array(':name' => $language->language));
+}
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.786
diff -u -r1.786 comment.module
--- modules/comment/comment.module	15 Oct 2009 14:07:27 -0000	1.786
+++ modules/comment/comment.module	15 Oct 2009 16:37:20 -0000
@@ -720,6 +720,11 @@
   }
 
   $query->setCountQuery($count_query);
+  $filters = variable_get('comment_filters_' . $node->type, array());
+  foreach ($filters as $module) {
+     $function = $module . '_comment_filter';
+     $function($query);
+  }
   $cids = $query->execute()->fetchCol();
 
   return $cids;
@@ -1011,6 +1016,20 @@
       '#title' => t('Require preview'),
       '#default_value' => variable_get('comment_preview_' . $form['#node_type']->type, COMMENT_PREVIEW_OPTIONAL),
     );
+    // Get all defined filters
+    $filters = array();
+    foreach (module_implements('comment_filter_info') as $module) {
+      $function = $module . '_comment_filter_info';
+      $filters += $function($form['#node_type']->type);
+    }
+    if (count($filters) > 0) {
+      $form['comment']['comment_filters'] = array(
+        '#type' => 'checkboxes',
+        '#title' => t('Comment filters'),
+        '#options' => $filters,
+        '#default_value' => variable_get('comment_filters_' . $form['#node_type']->type, array()),
+      );
+    }
   }
 }
 
@@ -1248,7 +1267,7 @@
  *   A comment object.
  */
 function comment_save($comment) {
-  global $user;
+  global $user, $language;
 
   $defaults =  array(
     'mail' => '',
@@ -1263,7 +1282,6 @@
   }
   // Make sure we have a bundle name.
   if (!isset($comment->node_type)) {
-    $node = node_load($comment->nid);
     $comment->node_type = 'comment_node_' . $node->type;
   }
 
@@ -1365,6 +1383,7 @@
         'name' => $comment->name,
         'mail' => $comment->mail,
         'homepage' => $comment->homepage,
+        'language' => $language->language
       ))
       ->execute();
 
Index: modules/comment/comment.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.49
diff -u -r1.49 comment.install
--- modules/comment/comment.install	15 Oct 2009 12:44:34 -0000	1.49
+++ modules/comment/comment.install	15 Oct 2009 16:37:19 -0000
@@ -263,6 +263,12 @@
         'length' => 255,
         'not null' => FALSE,
         'description' => "The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
+      ),
+      'language' => array(
+        'type' => 'varchar',
+        'length' => 12,
+        'not null' => FALSE,
+        'description' => "The languages.language of this comment.",
       )
     ),
     'indexes' => array(
