When users navigate to other nodes:
1) the language value (set by users via this module/ the 'Language switcher dropdown' block) is ignored, so the target/ next node appears in the default language and
2) the value displayed in the dropdown field remains unchanged, even though the actual language of the target/ next is different.
I tested this using a clean install of the latest Drupal core, running only (optional) core modules.

Users picking a language via a select field within a block (i.e. outside the node area) expect that such setting applies to all nodes (is a site-wide setting for that session) and that values displayed such fields accurately reflect that of the current node.

So, if a user picks a non-default language, that node should appear in that language. If next the users navigates to another node, the language of that node should also appear in that non-default language. If a translation of that node doesn't exist in that language, the language should fall back to the default language.

If (for whatever reason) such logic/ behavior is undesired, it should become optional at least.

Pls, feel free to move this issue to a (optional) core module. NB: The issue occurs also without having the 'Internationalization' module (http://drupal.org/project/i18n) installed, which isn't a requirement for the 'Language Switcher Dropdown' module anyway.

Comments

not_Dries_Buytaert’s picture

Title: Language (session) setting should apply to *ALL* nodes (site wide) or at least reflect the language of the current node. » Language setting should apply to *ALL* nodes (i.e. site-wide)
Project: Language Switcher Dropdown » Drupal core
Version: 6.x-1.2 » 6.16
Component: Code » locale.module

FYI: I have:

  1. enabled following modules 'Locale' & 'Content translation' ONLY (i.e. just optional core modules and no other modules),
  2. set 'Language negotiation' (admin/settings/language/configure) to value "Path prefix only.",
  3. added one non default language (admin/settings/language),
  4. set 'Multilingual support' (admin/content/node-type/{content_type}) to value "Enabled, with translation" and
  5. enabled the 'Language switcher' block (admin/build/block).

The behavior described in the start post occurs also with the standard 'language switcher' block (i.e. without a dropdown field).
So, the root cause of this issue is likely after line 556 of the file 'locale.module' (part of the core module 'Locale'):

// ---------------------------------------------------------------------------------
// 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');
    // Not worth caching.
    $block[0]['cache'] = BLOCK_NO_CACHE;
    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) {
    $path = drupal_is_front_page() ? '<front>' : $_GET['q'];
    $languages = language_list('enabled');
    $links = array();
    foreach ($languages[1] as $language) {
      $links[$language->language] = array(
        'href'       => $path,
        '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, $path);

    $block['subject'] = t('Languages');
    $block['content'] = theme('links', $links, array());
    return $block;
  }
}
dpearcefl’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Is this issue still occurring in the current version of Drupal v6?

dpearcefl’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.