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):
[%"Text to be translated"|i18n%]
[%"You gained %d experience points"|i18n($xpdelta)%]
or
[% | i18n %]A Long Text that is better to stay out[% END %]
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.