Translation of html

Translation of html

I came across a translation problem with html text.

I have a espace with several expressions with HTML text and their corresponding translations, including the tags, in the translation file.
What happens is that these texts are not translated.
Does anyone know how to work around this situation?

Thanks in advance.
Hi Patrícia,

When you go to the Translations Behaviour Editor you will find that by default all Expression widget literals are set to "Not Defined" insofar as being translated. This, like the explicit "Don't Translate" does not include it in the list of resources to translate.

You may want to change these to "Translate" instead and take it from there.

Hope this helps,

Hi Patrícia,

What I use to do in such a case is to split the html-expression in order to make it easier to translate. So:
"<strong>Hello World!</strong>" becomes "<strong>" + "Hello World!" + "</strong>".

This way you get 3 expressions in the translation tool. You can set "<strong>" and "</strong>" to 'Don't Translate' and only translate "Hello World!".

Kind regards,
Miguel Melo I have already configured the expression to be translated but it doens't translate when it has html tags.

I suppose I'll have to follow Lennart Kraak idea.

Thank you.
Hi Patricia,

I did a quick test eSpace (in attach) that can confirm that translation works for both unescaped and escaped expression. See attachment for details.

Are you sure that you didn't just set those lines to "Translate" but forgot to actually provide a translation for them?


I discovered the real problem. <br> tag
A expression with <br> won't be translated.
I don't really know why there's so many <br> in this espace but I suppose I'll have to remove them all now.
Hi Patricia,

That sounds very weird... could you submit feedback to OutSystems support from within Service Studio so we can have that situation logged into our issue tracker, please?

Many thanks,

There's no real need for it to be with the tags <br> but here goes a example of when it fails.
Oh, I see now. The problem appears to be because the expression text is multi-line and not because it has explicit BR tags.

You can work around the problem by making the (original) expression text not have Carriage Returns/ENTERs and just the <br> tags. This will produce the output you want and translation should work.

I would still submit this eSpace via Submit Feedback because it is either a bug or undocumented (as far as I know).

Many Thanks,

Thank you for your help.

I will submit.