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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Template::Toolkit, look-and-feel and internationalization
by davidrw (Prior) on Jun 13, 2005 at 17:39 UTC | |
by lachoy (Parson) on Jun 13, 2005 at 20:01 UTC | |
by davidrw (Prior) on Jun 14, 2005 at 00:13 UTC | |
by ruoso (Curate) on Jun 14, 2005 at 11:54 UTC | |
by deliria (Chaplain) on Jun 14, 2005 at 13:21 UTC | |
by lachoy (Parson) on Jun 14, 2005 at 01:23 UTC | |
Re: Template::Toolkit, look-and-feel and internationalization
by deliria (Chaplain) on Jun 14, 2005 at 10:13 UTC | |
Re: Template::Toolkit, look-and-feel and internationalization
by jhourcle (Prior) on Jun 14, 2005 at 01:15 UTC |
Back to
Seekers of Perl Wisdom