Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.174
diff -u -p -r1.174 menu.inc
--- includes/menu.inc	1 Jun 2007 09:40:40 -0000	1.174
+++ includes/menu.inc	3 Jun 2007 09:40:44 -0000
@@ -850,7 +850,7 @@ function menu_get_active_help() {
     // Don't return help text for areas the user cannot access.
     return;
   }
-  $path = ($item['type'] == MENU_DEFAULT_LOCAL_TASK) ? $item['tab_parent'] : $item['path'];
+  $path = ($item['type'] == MENU_DEFAULT_LOCAL_TASK) ? $item['tab_parent'] : $_GET['q'];
 
   foreach (module_list() as $name) {
     if (module_hook($name, 'help')) {
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.177
diff -u -p -r1.177 locale.module
--- modules/locale/locale.module	30 May 2007 08:08:58 -0000	1.177
+++ modules/locale/locale.module	3 Jun 2007 09:40:45 -0000
@@ -55,6 +55,9 @@ function locale_help($section) {
       return '<p>'. t("This page allows you to export Drupal strings. The first option is to export a translation so it can be shared. The second option generates a translation template, which contains all Drupal strings, but without their translations. You can use this template to start a new translation using various software packages designed for this task.") .'</p>';
     case 'admin/build/translate/search':
       return '<p>'. t("It is often convenient to get the strings from your setup on the <a href=\"@export\">export page</a>, and use a desktop Gettext translation editor to edit the translations. On this page you can search in the translated and untranslated strings, and the default English texts provided by Drupal.", array("@export" => url("admin/build/translate/export"))) .'</p>';
+    
+    case 'admin/build/block/configure/locale/0':
+      return '<p>'. t("This block is only shown if you have <a href=\"@languages\">at least two languages enabled</a> and you have a <a href=\"@configuration\">language negotiation setting</a> different from 'none', so you have different web addresses for different language versions.", array('@languages' => 'admin/settings/language', '@configuration' => url('admin/settings/language/configure'))) .'</p>';
   }
 }
 
@@ -488,3 +491,42 @@ function _locale_batch_import($filepath,
     $context['results'][] = $filepath;
   }
 }
+
+// ---------------------------------------------------------------------------------
+// Language switcher block
+
+/**
+ * Implementation of hook_block().
+ * Displays a language switcher. Translation links may be provided by other modules.
+ */
+function locale_block($op = 'list', $delta = 0) {
+  if ($op == 'list') {
+    $block[0]['info'] = t('Language switcher');
+    return $block;
+  }
+
+  // Only show if we have at least two languages and language dependent
+  // web addresses, so we can actually link to other language versions.
+  elseif ($op == 'view' && variable_get('language_count', 1) > 1 && variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE) != LANGUAGE_NEGOTIATION_NONE) {
+    $languages = language_list('enabled');
+    $links = array();
+    foreach ($languages[1] as $language) {
+      $links[$language->language] = array(
+        'href'       => $_GET['q'],
+        'title'      => $language->native,
+        'language'   => $language,
+        'attributes' => array('class' => 'language-link'),
+      );
+    }
+    
+    // Allow modules to provide translations for specific links.
+    // A translation link may need to point to a different path or use
+    // a translated link text before going through l(), which will just
+    // handle the path aliases.
+    drupal_alter('translation_link', $links, $_GET['q']);
+    
+    $block['subject'] = t('Languages');
+    $block['content'] = theme('links', $links, array());
+    return $block;
+  }
+}
