Closed (fixed)
Project:
Consistent Language Interface
Version:
6.x-2.5
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 May 2010 at 12:00 UTC
Updated:
7 May 2010 at 23:40 UTC
I have a site with 5 languages. Some pages are language neutral and contain links to other pages of the same site. I create these links inside my pages with a href="/path" .
When I use the language block of i18n all these links change automatically to comply to the currently selected language, so that when the user clicks on them he preserves the interface language (the url gets the language prefix automatically).
When I use consistent language interface block this behavior is lost. The links are no more aware of the current language and always point to the "default" language without prefix.
Could you fix this?
Comments
Comment #1
PixelClever commentedWhen the language negotiation is set to prefix only (which is required for this module) then adding the 'en' to a path when English is the default language will result in a page not found error. To test this try going to the following links on my English and French website:
http://pixelclever.com/drupal-tutorials (default language English without prefix works)
http://pixelclever.com/fr/drupal-tutorials (French with prefix works)
http://pixelclever.com/en/drupal-tutorials (Adding the prefix when it is not needed and the result is page not found)
I know it is stupid, but it is an issue with Drupal core, not with this module.
If you need language aware links then use the global variable $language->language, but I would suggest using the l() function to insure that it works consistently.