On 04-12-2008 at 21:24:37 Ian Boersma <[EMAIL PROTECTED]> wrote:
Hi Levi,
Here is what I currently have in my .html page for this mixed string:
<p i18n:translate="focus_on_text">Check out our new
<a href="/posts/cc_launcher.php"
tal:attributes="href classroom_corner/href; title classroom_corner/title"
tal:content="classroom_corner/text">"Classroom Corner"</a> feature, where
you can stay up-to-date with all the goings-on for your child's
classroom!</p>
The wrinkle comes in when I need to wrap the whole thing in the
'i18n:translate' attribute (since all of this is contained within a
single p tag).
Try this:
<p i18n:translate="">Check out our new
<a href="/posts/cc_launcher.php"
i18n:name="link"
i18n:attributes="title title"
tal:attributes="href classroom_corner/href">
<tal:block i18n:translate="">"Classroom Corner"</tal:block></a>
feature, where you can stay up-to-date with all the goings-on for your child's classroom!
</p>
You'll then get translation key for the <p>:
Check out our new ${link} feature, where you can stay up-to-date with all the
goings-on for your child's classroom!
and keys for title and text of the link.
* i18n:name="foo" turns any element into variable ${foo} inside translation.
* i18n:translate="" can be nested (just not on the same element as i18n:name, hence
the <tal:block>)
* i18n:attributes is similar to tal:attributes, but gets them translated.
--
regards, Kornel
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal