remo williams - 2009-04-02 07:21:42
hi folks,
i'm having a kind of special problem which is to show a page depending on a variable without setting it by a form-tag or request-parameter on the adress-bar a.s.o
let me explain:
i own a multilingual site (5 languages by now).
all pages are alike (texts being set via a template-engine depending on the browser's native language). it works just fine so far!
what i do is showing the falgs of the other languages which are not the active one, in order not to have an uk-flag if the page is in english anyway (that works just fine too).
now presuming that one has an english page, but rather wants to see the page (and in fact the site) in french, he'll click on the french flag which makes the whole page appear in french (great). now the problem is, that as soon as the user clicks on a menulink (a-tag) the next page is again in english, which would force the user to click the french flag again! (and that's exactly what sucks!)
i've tried everything, even a hidden input without form-tag in order to have a $_POST-variable to work with, but .......
the charge is:
have a variable to work with,
not allowed are:
solutions such a "?lang=...." within the a-tag (i want to keep my adress-bar clean!)
any other solution which would make the user have to click anywhere else but on the flag!
any solution about sucking cookie-stuff (assuming that some internauts don't activate them anyway!
no javascript!
all i want is just a plain and simple php-solution!
any hint anyone?
many thanks in advance!