Incompatible with Language negotiation set to "Path prefix with language fallback"

BenKewell - June 27, 2009 - 19:55
Project:Consistent Language Interface
Version:6.x-2.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:fixed
Description

if Language negotiation method is set to "Path prefix with language fallback"
all links should have language prefix in the path, so that the language is preserved instead of changing to browser default value

as the module always remove the prefix for the link of default language
in case a user views a site which default language is different from browser's default language
when the user click on the default language link in the module's block
drupal would always do the browser language check again and always display browser's language
so the user would not be able to view the site's default language

the patch below fix the problem by performing check of language negotiation before removing the prefix for default language

at line 128 to 131:

$default_language = language_default(); 
if ($lang == $default_language->language && variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE) != LANGUAGE_NEGOTIATION_PATH) {
  $prefix = '';
}

#1

joergvk - September 19, 2009 - 15:36

Subscribing

#2

Aaron Hawkins - November 15, 2009 - 04:57
Status:needs review» fixed
 
 

Drupal is a registered trademark of Dries Buytaert.