Active
Project:
Custom language negotiation
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2010 at 15:25 UTC
Updated:
21 Jun 2010 at 12:10 UTC
I haven't had the chance yet to take a look at the code, but I'm pretty sure you could do this without hacking core.
Have you tried using any of the following modules/techniques?:
- purl (http://drupal.org/project/purl)
- url_alter (http://drupal.org/project/url_alter)
- custom_url_rewrite_outbound (http://api.drupal.org/api/function/custom_url_rewrite_outbound/6)
Comments
Comment #1
jax commentedI know of these modules but I would be surprised if it was possible to implement this without hacking core. It certainly won't be pretty. The problem is that if you set the language in hook_boot it will be reset by the language initialisation. Then you need to make sure to set the language back in hook_init() and make sure it runs before any other module.
I'll look in more detail at the modules and see what I can come up with.
Comment #2
danny_joris commentedHello Olivier,
What is the status on this? Not sure if this is possible, but I agree on a solution without core hack. The last patch is for D-6.15 while 6.17 is out now. Though this might still work, the patches will be outdated fast.
Maybe a backport in core from D7 is more likely?
Comment #3
jax commentedD7 supports custom language negotiation so it should be possible to implement this in D7 without patch. I'll update the module with a patch for D6.17.
Comment #4
jax commentedThe patch has been updated in HEAD. Since it the one in beta still applies I'm not creating a new release.