I have this string as the translation key:
You must be <a href="path/goes/here" title="Log in">logged 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 I assume that is incompatible with the fact that the string
itself is up for translation. How do I do that then??

And as for the HTML, I could use:

<div i18n:translate="structure 'You must be <a href="path/goes/here"
title="Log in">logged in</a> to post a comment.'" />

But I see two issues
here. First, the double quotes, I assume, in the string, won't work.
Secondly, it looks too damn ugly putting this whole string within an
attribute of the div tag. Just yuk.

Would this work? (I assume not) -

<div i18n:translate="structure">You must be <a href="path/goes/here"
title="Log in">logged in</a> to post a comment.
</div>

And even if that does work, how do I bring it all together so that both the
HTML is retained AND the variable substitution occurs?!

The only markup I can even come up with (which I haven't yet tested) is:

<div i18n:translate="structure">You must be <a href="path/goes/here"
title="Log in" i18n:attributes="href path/to/var">logged in</a> to post a
comment.
</div>

What WILL work, oh gurus?!

Cheers,

-Alister

---
Alister Cameron // Blogologist
http://www.alistercameron.com

Mob. 04 0404 5555
Fax 03 8610 0050

Click here to find me online:
http://clicktoadd.me/alicam
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to