[Pmwiki-users] PerGroupSettings

Patrick R. Michaud pmichaud
Mon Oct 18 08:06:30 CDT 2004


On Mon, Oct 18, 2004 at 01:56:29PM +0200, Philip J?genstedt wrote:
> I want to do language settings per group. I want all groups except 'en' 
> to have swedish language, set with XLPage('sv','sv.XLPage');
> 
> How can I accomplish this? If I set the language to swedish in 
> config.php, how do I unset it in en.php? 

Oh, as usual there are several ways to do it.  First, in config.php you 
could load the sv.XLPage only if you're not in the 'en' group

    $group = FmtPageName('$Group',$pagename);
    if ($group!='en') XLPage('sv','sv.XLPage');

Another way of doing it is to always load XLPage('sv','sv.XLPage')
in config.php, but then in en.php tell PmWiki to only use the english
translations:

    $XLLangs = array('en');

For this application, I think the second method is a bit cleaner.

Pm



More information about the pmwiki-users mailing list