Would be nice to be possible to have expressions like this "some text {0} some other text", variable1
This would help us when taking care of translations since the text would be all together and beside that the variable can change place depending on the language.
Yes, definitely! I frequently use things like Replace("There are {0} items available", "{0}", NumItems). Would be nice to have this natively!
Hi Marcelo,
Indeed, having some kind of string interpolation would help in translations. Although we have no current plans to address this, we're adding it to our radar so we can consider it in the future.
Thanks a lot,Tiago Simões
Definitely a must have with at least two improvements from what is currently possible:
Since OutSystems is moving towards ReactJS, you could even implement it similarly to what JavaScript has with template literals (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals), where backticks (` `) are used to define the beginning and end of an expression and the dollar sign and curly braces as placeholders for an expression (${expression}). In the previous example, it would become: `Some text ${Variable} some other text`.
This similar implementation would avoid having different methods to construct variables in different parts of the platform, as it would only add more confusion to the developers.