Page 1 of 1

strategy for multilinguage site

Posted: Sat Mar 28, 2009 2:14 pm
by itp
I am developing a multi-lingual site. User can click on any page on language button on top right of page which passes a $_GET variable back to program which will load appropriate language variables from language file and present page in appropriate language. I load language preference as a $_SESSION variable for future reference.

Now, when user changes languages, I send user back to default home page because I have lost previous parameters. I was wondering if there is a way that I can force current $_GET and $_POST values back into the page submit so that user will return to his current page, but in the new requested language... or maybe there is a better way of doing this.

I hope that I am expressing myself clearly.

Re: strategy for multilingul site (parm passing)

Posted: Wed Apr 01, 2009 6:45 am
by itp
I have re-phrased the question, because I assume the lack of responses was due to the vagueness of the question.... :?

PHP question: I would like to store parms passed into an interactive PHP program from a web page and then and "re-post" them as program ends.

Here is the use case: I am developing a multi-lingual site with a query. User must be able to click one of several "language selection" links (eg: ENG,FR,SP) on top right of page at any time which passes a $_GET variable back to program which will load appropriate language variables from language file and present page in appropriate language. I would then load the language preference as a $_SESSION variable for future reference.

Currently, when user changes languages, I send user back to default home page because I have lost previous parms and the program does not know where we came from. I was wondering if there is a way that I can force current $_GET and $_POST values back into the page submit so that user will return to his current page, but in the new requested language... or maybe there is a better way of doing this. BTW I would prefer not having to to use mod_rewrite or Ajax here.

I hope that I am expressing myself clearly. It is easier to demonstrate then explain.