I am running into problems doing my magic with $_GET['q'] in one project that is using both strongarm and i18n. My situation:

- I need to support multiple languages in multiple countries. Let's say a site in russia in russian language and site in russia in english language. Then site in Nicaragua in Spanish and site in Nicaragua in English.
- I decided to use language codes like ru-EN, ru-RU, ni-SP, ni-EN
- ru-RU is www.example.ru
- ru-EN is www.example.ru/en, etc.

This is a combination of both path prefix and domain language negotiation in Drupal 6 which is unsupported. I am trying to override $_GET['q'] in settings.php based on the domain + path in order to set ru-EN language if the page is www.example.ru/en, then use custom url rewrite outbound to rewrite all links from www.example.ru/ru-EN/path to en/path.

Unfortunately, when I change $_GET['q'] to 'ru-en/path' when i go to www.example.ru/en/path, strongarm changes this back to 'en/path', leading to 404 Not found. This happens here:

  $_GET['q'] = strongarm_language_strip($_REQUEST['q']);

I managed to get this working by changing $_REQUEST['q'] but I feel this should be better documented or commented in the code. I am however unsure why the $_REQUEST is used here.

Comments

rmontero’s picture

Any responses to this? I have the same issue in D7

webflo’s picture

pfrenssen’s picture

Status: Needs review » Closed (duplicate)

This is not needed anymore since #1062452: strongarm_set_conf() needs to be called sooner got fixed.