[pmwiki-users] Switching languages
Patrick R. Michaud
pmichaud at pobox.com
Fri Jan 28 11:00:04 CST 2005
On Fri, Jan 28, 2005 at 04:41:41PM +0000, Hans Bracker wrote:
> Friday, January 28, 2005, 3:32:47 PM, Patrick wrote:
> > But there's actually several ways to do it. On pmwiki.org I actually
> > do it in local/config.php, by checking for the existence of $Group.XLPage
> > for whatever group we happen to be in:
>
> > $xlpage = FmtPageName('$Group.XLPage');
> > if (PageExists($xlpage)) XLPage($xlpage);
>
> When I try this it brings up two errors:
> First: FmtPageName wants a second argument.
> XLPage wants a second argument too.
> Now this would be 'fr' or 'de' or whatever. How is that delivered?
Arrgh, sorry about that. pmwiki.org actually does the rough equivalent of:
# get the name of the XLPage in the current group
$xlpage = FmtPageName('$Group.XLPage', $pagename);
# if the XLPage exists, load it
if (PageExists($xlpage)) XLPage($xlpage, $xlpage);
The XLPage function doesn't really care if the first argument is
'fr', 'de', or whatever -- it's only there for the very rare
situation where an administrator might want to load additional
translations to a language that has already been loaded.
Pm
More information about the pmwiki-users
mailing list