ruoso has asked for the wisdom of the Perl Monks concerning the following question:
hi,
Which would be a good way of using Template::Toolkit together with:
- Supporting look-and-feel, having different sets of templates that can inherit from each other, like, the theme A has all the templates, the theme B modifies some templates of the theme A and theme C modifies some templates of the Theme B.
- Supporting inline gettext or any other way of translating the text inside the templates, I mean, I don't want to have the complete set of themes for all the languages, but I do want to have a simple gettext-like infra-structure to translate the application, but I want that integrated with TT.
So, what do you say?
Update: For the gettext question, I've already found a good way to do it using a FILTER (thanks davidrw and deliria) (BTW, this example presumes a i18n filter that translates and sprintf the string):
or[%"Text to be translated"|i18n%] [%"You gained %d experience points"|i18n($xpdelta)%]
[% | i18n %]A Long Text that is better to stay out[% END %]
daniel
Back to
Seekers of Perl Wisdom