By xalexas on
Does i8n set cookie when you choose language? I would like to redirect user on next visit to the homepage in previously chosen language. Based on cookie (only for anonymous users).
I would like to setup let's say "splash" page with language switcher. User picks language and go to homepage in his language. Next time when user visit site, splash page is not displayed but redirected to homepage in language previously chosen.
How can this be achieved? Is there any module with this functionality or I have to write custom function to do this?
Thanks.
Comments
I'm looking for the same
I'm looking for the same think... I want the users to be able to choose a language first time they come to the site, after that, the language should be automatically selected after the cookie that was previously made... and if they choose to change the language using the language block, the cookie should also be modified...
If I won't find something suitable I'll try to make a small module to do this... tho I never made a module before... so It would be tough to find all the right hook to do a 'proper' module... never done this before... but i'm seeing this module as a sort of form that lists all the enabled languages, and sets the destination after the form is submited.
and if not... there is always the alternative: "hacking page.tpl.php" or let's say template.php
the only posts I found on
the only posts I found on d.org are some 5 years old posts... with some patches for i18n that look promising which I'll try to 'update'/modify to work with the current version.
there some rather new post on "Internationalization" group... that deal with languages an cookies... but no one posted anything useful yet...
I have found some clues here:
I have found some clues here: http://blog.merge.nl/2009/01/16/drupal-6-multilingual-i18n/ (Edoardo post)
But that's not quite what I was looking for, besides it's just template editing. I was hoping that I will find something specific about Internalization module.
Any help is very appreciated.
Sasha
Print & Screen
looking for the same thing
this is exactly what i am trying to accomplish.
just a one time splash screen....
if there are any updates, please post!
_
I'm looking for the same functionality, but without the splash page. In my case the user should be redirected to the last used language when entering the website. So, if this user used the french translated pages last time he visited, he would have to be redirected from example.com to example.com/fr .
I am trying to wrap my head around this by writing a snippet, but I encounter a very strange bug ( or I'm doing something completely wrong ) I posted the issue here: #832566: Trying to set up a cookie language fallback snippet: Very strange bug !
I would love to learn more about this.