I am using PHPTAL to templatize a website that needs to be delivered in
English and Spanish (so I'm using PHPTAL's integrated 'gettext' class for
doing the string translation).  While this is going great for simple strings
and standalone hyperlinks (e.g.: a href="....")  I'm not sure how to handle
it when dealing with a string with an embedded hyperlink.

For example, I have the string:  "Check out our new <a
href="/posts/cc_launcher.php">Classroom Corner"</a> feature, where you can
stay up-to-date with all the goings-on for your child's classroom!"  While I
an use the "tal:attribute" method on standalone hyperlinks (say in a
navigation menu) and can use the "tal:content" or "i18n:translate" methods
to replace strings, I'm not sure how to achieve BOTH in this mixed
string/hyperlink model.  At this point, applying the "tal:content" method
only allows me to replace the entire string (anchor tag included) with
another string (thus, removing the anchor tag altogether in the output).

Any ideas how to use PHPTAL to replace both the string portion of this AND
the attribute portion?

Thanks in advance for your help,


Life, if well lived, is long enough.

~ Seneca (5 BC - 65 AD).
PHPTAL mailing list

Reply via email to