Is there a way to get the Babel language links to link to the corresponding page in the other context?
Babel have a snippet called "BabelLinks".
zaenal.lokamaya
Yes, but it only provides links to the home page of the language chosen. I'm sure there must be some way to link to the corresponding page in the other language.
Ok, that's the holdup then. Makes sense. I haven't yet been able to figure out the Babel dialog when editing resources. Trying to do too much at once.
-
- 2 Posts
Hi,
I'm new to modx (I usually work with Drupal).
Is there anyway available script or module to allow the user to pick a language and save it as default for the next visit (the script in place uses Babel link but doesn't save the user's choice - the session is destroyed when he leaves the website) ?
The code i've come up with works (detect first visit, if first visit display popup window, user chooses his languages, sets a cookie...) but won't match the one already in place.
Thanks for your help.
-
- 2 Posts
i forgot : the modx version is 2.0.8.
I think that the solution you wrote here is the only way to do it. There is no finished module that could accomplish this. If the user is anonymous than there is no other way to store information other than a cookie as far as I can think of. There may be some idea of saving the ip address of the user and then having a script that tracks that, but I am not sure how reliable the IP address readout would be on the user. Usually you just get an IP from their provider.
Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.