[pmwiki-users] newbie: PageNotFound translation

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 13 10:49:55 CST 2007


On Tue, Feb 13, 2007 at 05:37:45PM +0100, sgp wrote:
> Patrick R. Michaud wrote:
> 
> > Complex conditionals require 'expr' at the front, and parens
> > and other operators require spaces around them.
> > 
> >    (:if expr ( userlang de ) && ( ! group Category ) :) ...
> >    (:if expr ( userlang en ) && ( ! group Category ) :) ...
> > 
> Thank you. It didn't work, which prompted me to check
> multilanguage.php... there are two regex matches, and
> I think that they're limiting matches to "(:if userlang" only
> 
> preg_match_all('/\(:if\s*userlang\s*(.+?)\s*:\).*?\(:title\s*(.+?)\s*:\)/msi', $text, $matches); 
> preg_match_all('/\(:if\s*userlang\s*(.+?)\s*:\)/msi', $text, $matches); 

Ouch.  I didn't realize that multilanguage.php was doing
its conditionals this way.

I think it's possibly time to rewrite the multilanguage recipe,
especially since we can likely do a much better job now that we
have page text variables and other ways of setting page properties.

Could someone describe to me the ways in which they are wanting
to use multiple languages on a single page?  I.e., what sorts of
features are needed from the existing recipe, and what things do
you want to do that the recipe currently cannot?  I might be 
able to put something together very quickly.

Pm



More information about the pmwiki-users mailing list