I'm somewhat of confused. As far as I knew every text in a gettext function is used as msgid
So this one:
_("My long text that I <br> because I need to ")
should be:
#: htdocs/index.php:8
msgid "My long text that I <br> because I need to"
msgstr "Translation needs different <br> inside because russian is different"
I just can't find any documentation that gettext() or _() strips html tags out.
Should I be replacing it like this? And why?
sprintf(_("My long text that I %s because I need to "), '<br>')
Both would work okay, gettext does not string anything out of the messags. You might however want to not include HTML in translations to make translators life easier - it is easier to just translate string and don't have to care about HTML markup. Of course sometimes it is not really possible...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With