[pmwiki-users] need expert review - multilanguage recipe change

SteP step.list+pmwiki at gmail.com
Sat Jul 18 13:26:57 CDT 2009

Hans wrote:
> The conditional (:if userlang xx:) stays intact.
> The normal (:title yyyyyy:) stays intact too.
> So both together will continue to work.
> But we add an alternative (:title-xx yyyyyyy:) markup.
> My question is: does the recipe need to have a mechanism to pick up
> which languages are used on a page?
> The simpler solution is to scrap that, and to rely on the languages
> declared in a config array.

I don't use that feature, so my answer would be negative.
But some  people on this list have shown markup examples using langinpage.
I do use selectlang but only on the sidebar where all the languages my wiki supports are implemented.
I don't know how other people use selectlang.

Maybe this should be a new recipe, multilang2, which provides some level of backward compatibility 
with multilang, but only for selected features? Personally, I make heavy use of mainly two features:

* the ability to display text in different languages
(:if userlang xx:)xx text...

* the ability to show language-specific page titles in pagelists and categories

I use a patched version of multilang, my patch is described in the cookbook page, here's the summary:

Fix mismatch between skin language and Category page language: 
After line 85 add the two lines marked 'SteP added'.

85		} else {
86			$userlang = $_COOKIE['userlang']; // SteP added
87			if($userlang=='')                 // SteP added
88			$userlang = $DefaultLanguages[0];

> But this means that if the recipe supports a (:selectlang:) directive
> to display links for changing the language, this will h=give all the
> choices, even if they are not implemented on the particular page.
> also the 'if langinpage' conditional will not be available.

More information about the pmwiki-users mailing list