Skip to Content
0
Former Member
May 08, 2014 at 02:51 PM

Combining i18n translations with variables

2337 Views

Hello experts!

I would like to combine an i18n placeholder with a variable like this:

var error = "blabla";
...
var text = "{i18n>ERRORTEXT}"+": " + error;
console.log(text);

Current result:

{i18n>ERRORTEXT}: blabla

Desired result:

An error occured: blabla

Does anybody know how I can change my code to bring UI5 to interpret the i18n placeholder?

Best, Silvia