I’m currently developing a non-trivial theme right now, most of the time I’m not using a __($str)
translate function when there’s an HTML tag therein the text. Is it good to always use the translate functions such __($str)
and _e($str)
whenever there’s a text that’ll be going to output? Any downside with it?
Can I still use it even to a very long text that have mixed with an HTML tag such like this?
__("This <em>text</em> have an <b>HTML</b> tag. Another sentence...")
Or it is good to use like this? (*Looks messy..)
__('This ').'<em>'.__('text').'</em>'.' have an '.'<b>'.__('HTML').'</b>'__(' tag.')
How to properly use such kind of a function?