Is it possible to negotiate language (user preferences, browser settings) for every url without prefixing the path or domain? The site I'm building uses Drupal for Facebook, a.k.a. DFF, to integrate with Facebook. Facebook requires a single callback base URL from which all paths are built. DFF handles this with a url looking something like www.example.com/fb_cb/12345. Drupal's language handling breaks this by inserting the language prefix before DFF's callback, e.g. www.example.com/fr/fb_cb/12345, which Facebook considers a non-authorized URL and denies access. After asking this question at other parts of drupal.org, I've learned that this is also a problem in other modules, such as Site Verification. Is there any way to either hide the path prefix, invisibly negotiating the language or inserting it later in the URL (as a path suffix or injected after the callback base url)?

This seems to be something of a reoccurring question with complex answers and I'm not drupalist enough to find a solution to my problem. Excuse me if I've missed something obvious. Any hints would be gratefully accepted.

Comments

gábor hojtsy’s picture

Status: Active » Fixed

The reason we insist on languages in URLs is that if its not there, you cannot get your pages addressed, indexed, tweeted, etc. proper because it will look different for different people. You sure want to have your google juice, right? Drupal 7 has pluggable language detection built-in. For Drupal 6 you can work around this by using the site default language and changing it with your own logic in your settings.php before the bootstrap actually reaches its language section.

Status: Fixed » Closed (fixed)
Issue tags: -language, -path prefix

Automatically closed -- issue fixed for 2 weeks with no activity.