diff --git a/google_appliance.admin.inc b/google_appliance.admin.inc
index 88a061a..4e04a28 100644
--- a/google_appliance.admin.inc
+++ b/google_appliance.admin.inc
@@ -75,6 +75,28 @@ function google_appliance_admin_settings($form) {
     ),
     '#description' => t('Learn more about GSA auto-filtering <a href="@gsa-doc-af">here</a>. In general, employing both filters enhances results, but sites with smaller indexes may suffer from over-filtered results.', array('@gsa-doc-af' => 'http://code.google.com/apis/searchappliance/documentation/68/xml_reference.html#request_filter_auto') ),
   );
+  if (module_exists('locale')) {
+    $form['query_param']['google_appliance_language_filter_toggle'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Enable Language Filtering'),
+      '#default_value' => variable_get('google_appliance_language_filter_toggle', FALSE),
+    );
+    $form['query_param']['google_appliance_language_filter_options'] = array(
+      '#type' => 'checkboxes',
+      '#title' => t('Restrict searches to pages in a specified language'),
+      '#default_value' => variable_get('google_appliance_language_filter_options', array('***CURRENT_LANGUAGE***')),
+      '#options' => array(
+        '***CURRENT_LANGUAGE***' => t('Current user\'s language'),
+        '***DEFAULT_LANGUAGE***' => t('Default site language'),
+      ) + locale_language_list(),
+      '#states' => array(
+        'visible' => array(
+          ':input[name=google_appliance_language_filter_toggle]' => array('checked' => TRUE),
+        ),
+      ),
+      '#description' => t('If there are no results in the specified language, the search appliance is expected to return results in all languages.'),
+    );
+  }
   $form['query_param']['query_inspection'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable Query Inspection'),
diff --git a/google_appliance.module b/google_appliance.module
index ff01769..df0aa60 100644
--- a/google_appliance.module
+++ b/google_appliance.module
@@ -470,6 +470,27 @@ function google_appliance_search_view($query = '', $sort = NULL) {
       'access' => 'p',
       //'requiredfields' => $filter_param
     );
+
+    // Alter request according to language filter settings.
+    if (module_exists('locale') && variable_get('google_appliance_language_filter_toggle', FALSE)) {
+      $langcodes = array();
+      $options = array_filter(variable_get('google_appliance_language_filter_options', array('***CURRENT_LANGUAGE***')));
+      foreach ($options as $option) {
+        switch ($option) {
+          case '***CURRENT_LANGUAGE***':
+            global $language;
+            $langcode = $language->language;
+            break;
+          case '***DEFAULT_LANGUAGE***':
+            $langcode = language_default('language');
+            break;
+          default:
+            $langcode = $option;
+        }
+        $langcodes[$langcode] = "lang_$langcode";
+      }
+      $search_query_data['gsa_query_params']['lr'] = implode('|', $langcodes);
+    }
     
     // allow implementation of hook_google_appliance_query_alter() by other modules
     drupal_alter('google_appliance_query', $search_query_data);
@@ -668,6 +689,27 @@ function google_appliance_get_clusters() {
     'site' => check_plain($settings['collection']),
     'client' => check_plain($settings['frontend']),
   );
+
+  // Alter request according to language filter settings.
+  if (module_exists('locale') && variable_get('google_appliance_language_filter_toggle', FALSE)) {
+    $langcodes = array();
+    $options = array_filter(variable_get('google_appliance_language_filter_options', array('***CURRENT_LANGUAGE***')));
+    foreach ($options as $option) {
+      switch ($option) {
+        case '***CURRENT_LANGUAGE***':
+          global $language;
+          $langcode = $language->language;
+          break;
+        case '***DEFAULT_LANGUAGE***':
+          $langcode = language_default('language');
+          break;
+        default:
+          $langcode = $option;
+      }
+      $langcodes[$langcode] = "lang_$langcode";
+    }
+    $clusterQueryParams['lr'] = implode('|', $langcodes);
+  }
   
   // cURL request for the clusters produces JSON result
   $gsa_clusters_json = _curl_post($clusterQueryURL, $clusterQueryParams);
