I have a title "The First Catch" and another "The Second Catch"
However, I'd like them displayed as:
"
The First
Catch
"
and
"
The Second
Catch
"
So far I have tried
Code: Select all
{The_First_Catch}Code: Select all
$this->tpl['The_First_Catch'] = self::_("The First <br> Catch");Code: Select all
{The_First_Catch}Code: Select all
$this->tpl['The_First_Catch'] = sprintf(self::_("The First %s Catch"), '<br>');Code: Select all
{The_First_Catch}Code: Select all
$this->tpl['The_First_Catch'] = self::_("The First") . "<br>" . self::_("Catch");The only option left seems to be below, but it looks bad for developers and translators alike:
Code: Select all
{The_First}<br>{Catch}Code: Select all
$this->tpl['The_First'] = self::_("The First");
$this->tpl['Catch'] = self::_("Catch");Am I missing something? Or is that's the way I'm supposed to translate line breaks?
Solution:
Code: Select all
'{The_First_Catch}'.replace(/<br\/>|<br>/gi,"<br>")Code: Select all
$this->tpl['The_First_Catch'] = self::_("The First <br> Catch");I'll be adding this even in places that do not require line breaks, just in case a translator wishes to add one.