[Pmwiki-users] URL-based multilanguage support

Dominique Faure dominique.faure
Tue Jan 4 15:39:12 CST 2005


Hi,

I've found a workaround to this problem when developping my skin:

I made a 'skin.php' containing the following code:
===8<----------------------------------------------
...
global $PageQueryString;
$PageQueryString = $_SERVER["QUERY_STRING"] ? '?' . $_SERVER["QUERY_STRING"] 
: '';
...
===8<----------------------------------------------

Then, in my related 'skin.tmpl', I wrote my link as below in order to keep 
previous parameters.
===8<----------------------------------------------
...
<a href='$PageUrl$PageQueryString#TopOfPage'>...</a>
...
===8<----------------------------------------------

Here, I just added an anchor, but you may easily append your own parameter 
to the url.
The complete skin code is reachable at http://dominique.faure.1.free.fr

> Hello,
>
> I'm trying the recipe http://www.pmwiki.org/wiki/Cookbook/MultiLanguage
> for managing a multilanguage website with pmwiki.
>
> I would like to avoid using cookies, as I prefer the URL-based approach
> (adding param userlang=XX). The problem I'm facing is that if I set this
> param in the url for a certain page, then I click to another page, the
> param disappear and I get the default language.
>
> There is any way to make this param to be part of the URL of wiki pages
> and maintain the user choice?
>
>
> Thanks,
>
> Sergio
>
>
> --
> Sergio Andreozzi
>
> Istituto Nazionale di Fisica Nucleare - CNAF
> Viale Berti Pichat, 6/2
> 40127 BOLOGNA
> ITALY 




More information about the pmwiki-users mailing list