Download & Extend

Support language changing based on path

Project:Persistent URL
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

We have a drupal 6 site that has a number of languages setup - such as English(en) and Italian(it).

We set purl modifiers and a callback so that we set the domain and language based on the path.
ex. en/example-content would go to the English version and it/example-content would go to the Italian version.

The default language is English and we ran into a problem where at the path it/example-content, the page would be displayed in Italian, but the node would be the English version. The problem turned out to be that the path was initiliazed to the node before we could change the language.

We made a code change in the purl module which fixed this problem, but we were unsure of any possible consequences.

In the function purl_init(), we switched lines that call 'purl_get_normal_path' and 'drupal_init_path' so that
purl_get_normal_path was called first.

Can anybody think of any problems this may cause, or is this a harmless change?

nobody click here