Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: Template::Toolkit, look-and-feel and internationalization

by ruoso (Curate)
on Jun 14, 2005 at 11:54 UTC ( #466489=note: print w/ replies, xml ) Need Help??


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?

  • [%|i18n%]Text to be translated[%END%]
  • [%|i18n(10)%]You gained %d experience points[%END%]

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

daniel


Comment on Re^4: Template::Toolkit, look-and-feel and internationalization
Select or Download Code
Re^5: Template::Toolkit, look-and-feel and internationalization
by deliria (Hermit) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466489]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2015-07-02 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (34 votes), past polls