@nshkrsh has given you a good answer which may be solve your problem. However, particularly if you have multiple languages, an alternative approach may be worth considering (though using nested ternary operators would be on an option in this case - but the code could become rather inefficient).
I had a similar need for dynamic content and @George produced a new formatter (which I imagine will be incorporated into Wappler at some point - it would certainly be a useful feature). It’s discussed in this thread.