Ton Voon skrev:
>
> On 2 Jul 2009, at 09:35, Ton Voon wrote:
>
>> Does everyone agree this makes sense? If so, any objections if I add 
>> this to http://dev.catalystframework.org/wiki/best_practices?
>
> I've added a section at 
> http://dev.catalystframework.org/wiki/best_practices now.
>
> This includes Jose Luis Martinez's suggestions for the 
> escape_js_string routine, implemented as a TT filter.
>
> Final question: How do you internationalise a bit of text that does 
> want some markup within it? For instance, I want something that outputs:
>
> Click <a href="/about">here</a> for the about page.
>
> If I do something like:
>
> link = '<a href="/about">' _ c.loc("here") _ '</a>';
> c.loc("Click %1 for the about page", link)
>
> Then I cannot filter through html for the 2nd loc output.
>
> Is there a nicer way?
Wouldn't you need to send every part of the text through c.loc 
individually? I guess something like this:

c.loc("Click ") _ link _ c.loc(" for the about page")

Not so nice maybe, but I guess it should work?

KR,
Gunnar
>
> Ton







      

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to