@WillyC
I did not know about html_entity_decode(), and in fact is solves my problem for now:
<p>
<?php $t = "We love to <span class='highlight'>highlight</span> so that it <span class='highlight'> stands out</span>.";
$t = __($t);
echo html_entity_decode($t, ENT_QUOTES, 'UTF-8');
?></p>
main.css
.highlight {
font-weight: 600;
color: red;
}
The string will be output with the words 'highlight' and 'stands out' shown in bold red.
Thanks a lot for this tip!
At everyone:
Soma mentioned that when using __("text"), everytime I change the text, the translations needed to be updated, too. I haven't started doing any translations, but I know that I often tweak text here and there, even if I intially thought it was 'final'. I certainly don't want the translaters have to redo their translation every time I do such a tweak.
Is there a way to deal with edits to the main language text without effecting its translations?
Cheers,
Stefan