XHTML in translations

By defaults translations are assumed to contain only text, so PHPTAL escapes all " <" characters.

You can use structure keyword in i18n:translate to disable escaping and use translated text as-is:


            <div i18n:translate="structure '<b>bold text</b>'" />
          

Gives:


            <div><b>bold text</b></div>
          

Warning

Caveats: This will only work in simplest cases – TAL attributes inside translated strings are ignored. Ill-formed XHTML in translations will break page well-formedness.