[PHPTAL] Translation and HTML markup

2009-08-18 Thread Alister Cameron
I have this string as the translation key: You must be a href=path/goes/here title=Log inlogged in/a to post a comment. Two issues with it... 1. I want the href to be a variable. 2. I want the HTML retained. To replace the variable I could use the i18n:attributes=href /path/to/var approach, but

Re: [PHPTAL] How would you do this in TAL?!

2009-08-18 Thread Kornel Lesiński
On 18-08-2009 at 02:52:32 Alister Cameron alister.came...@cameroncreative.com wrote: Sometimes I just scratch my head...! And I recall a line from Danny Glover's character in Lethal Weapon: I'm too old for dis shit! That said, I'll keep trying to convert a WordPress theme into elegant

Re: [PHPTAL] How would you mark this up in TAL?!

2009-08-18 Thread Kornel Lesiński
On 18-08-2009 at 02:40:31 Alister Cameron alister.came...@cameroncreative.com wrote: I want to handle i18n as well as variable insertion (and conditions) from WordPress... as per this example: h3?php printf($comment_count 1 ? __('span%d/span Comments', 'thematic') : __('spanOne/span Comment',

Re: [PHPTAL] Translation and HTML markup

2009-08-18 Thread Kornel Lesiński
On 18-08-2009 at 08:25:32 Alister Cameron alister.came...@cameroncreative.com wrote: I have this string as the translation key: You must be a href=path/goes/here title=Log inlogged in/a to post a comment. Two issues with it... 1. I want the href to be a variable. 2. I want the HTML

Re: [PHPTAL] Translation and HTML markup

2009-08-18 Thread Alister Cameron
Thanks heaps Kornel. Can I extend this with variable substitution of the href attribute? As: div i18n:translate=structureYou must be a i18n:name=loginlink href= title=Log in tal:replace=href tal/path/herespan i18n:translate=logged in/span/a to post a comment./div ?? -Alister 2009/8/18 Kornel

Re: [PHPTAL] Translation and HTML markup

2009-08-18 Thread Kornel Lesiński
On 18-08-2009 at 11:04:02 Alister Cameron alister.came...@cameroncreative.com wrote: Thanks heaps Kornel. Can I extend this with variable substitution of the href attribute? As: div i18n:translate=structureYou must be a i18n:name=loginlink href= title=Log in tal:replace=href