http://www.perlmonks.org?node_id=466489


in reply to Re^3: Template::Toolkit, look-and-feel and internationalization
in thread Template::Toolkit, look-and-feel and internationalization

Just a little question... I saw that the | can be used for an alias to FILTER, but I didn't understood if this only applies to non-block directive... And if it's valid to remove the whitespaces... would the following be valid?

P.S.: Is there an alias for [%END%]?

daniel

Replies are listed 'Best First'.
Re^5: Template::Toolkit, look-and-feel and internationalization
by deliria (Chaplain) on Jun 14, 2005 at 13:21 UTC
    <EDIT>
    Yes, that's valid
    </EDIT>

    Changing that to:
    [% "Text to be translated" | i18n %]
    and
    [% "You gained %d experience points" | i18n(10) %]

    respectively, would eliminate the need for the [%END%] tag. I also find this more readable.