1

I selected the language preference to be detected with user sessions, the problem is that for anonymous user this preference does not seem to be stored. As this site is not user driven (Meaning that site users don t need to create account in order to browse the site), it s very problematic.

Is there anyway to have this language preference stocked in anonymous sessions ?

2 Answers 2

1

For Drupal 7 it's normal, there's no session created automatically for anonymous users, we created a new module that stores and detects the language inside a cookie, see locale_cookie, the benefit of a cookie is that your session table stays small.

1
  • Thanks Attiks, i especially like your modules (clientside validation is really net) so i ll be sure to give it a try :)
    – silkAdmin
    Oct 11, 2011 at 22:47
0

Answering my own question, i added the following code in the top of my html.tpl.php

 if (isset ($_GET['language'])){

    $_SESSION['language']=$_GET['language'];
 }

I am not sure if it's normal that this doesn't happen automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.