My feeling is that the easiest way to persist your current language selection would be to use a session variable (which in most cases would translate to a cookie on the user's machine). Your method also works, of course.
When you setup the session, you could set this automatically using $_SERVER['HTTP_ACCEPT_LANGUAGE'] var. Note, though, that you may need to translate the 2-char value to a full language code (e.g. 'en' -> 'en_US' in order for gettext() to work). Also, depending on how different the different lang versions of the site are (e.g. different graphics, etc.) you may want to think about using templates to store versions of your pages for the different languages (I use smarty: smarty.php.net). Using Smarty, you could change the template root based on the current $language session variable -- and then all your PHP pages would automatically grab the correct language-version of the template. E.g. templates/en_US/ templates/fr_FR/ etc. HTH, Hans On Wed, 2002-07-24 at 11:10, Anatole Varin wrote: > Great solution - looks really nice. I appreciate the advice and I'll give it > a shot on my next site. > > BTW, do you do something nifty to maintain the $language variable through > pages (currently I'm appending the variable as a hidden variable in all my > forms and appended to the end of links. > > Thanks again, > > Anatole > ++++++++++++++ > AichiNet > *Anatole Varin* > Programming > [EMAIL PROTECTED] > > > > > > > Here's the actual wrapper function I use: > > -- PHP Internationalization Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php