[pmwiki-users] Markup and XL substitutions

Patrick R. Michaud pmichaud at pobox.com
Mon Aug 21 21:39:55 CDT 2006

On Tue, Aug 22, 2006 at 12:14:39AM +0100, Hans wrote:
> I do not manage to get the markup right to display properly
> translated strings. This markup runs with the skin (function).
> I got something like this:
> global $FSLabel;
> SDV($FSLabel, '$[Text Size]');
> and (very much simplified, but the problem is there):
> Markup('fontsizer', 'inline', '/\\(:fontsizer:\\)/',
>    Keep("<html stuff....>$FSLabel<html stuff....>"));
> with markup (:fontsizer:) in the page, I only get
> $[Text Size] displayed, not Text Size.
> The XL substitution is missing.

Well, most importantly, since you put the "..." inside of a 
Keep(), PmWiki isn't going to process any markups it sees
inside, including the $[...].  Also, the $[...] markup is
processed very early in the sequence -- long before any "inline"
rules are processed.  

Chances are that you want to do the translation explicitly 
before the Markup rule:

    SDV($FSLabel, XL('Text Size'));


    SDV($FSLabelFmt, '$[Text Size]');
    Markup('fontsizer', 'inline', '/\\(:fontsizer:\\)/',
      Keep(FmtPageName("<html stuff...>$FSLabelFmt</html>", $pagename)));


More information about the pmwiki-users mailing list