Dec 15, 2020
I once worked on a project where to achieve some internalization they used a custom translation pipe and some other custom format.
The code looked something like this
<div text="{{'[|Hi, my name is|]' | translate}}"> </div>
In the code above the text to translate is the intro "Hi, my ....", and as you can see it is static in the template with some additional pipe characters.
The challenge was how to send a dynamic value with string interpolation. So the best shot I had was to run the pipe in the component code and send the already processed value to the template.