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.
strategy for multilinguage site
Moderator: General Moderators
Re: strategy for multilingul site (parm passing)
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.
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.