I'm trying to create a multi-lingual app that fetches the translations via an initial JSON fetch, based on the user's choice.
The translations are working fine, however I need to be able to replace a string with a computed number. For example: "Tim is X% bigger than Tom.", in Spanish it might be something like "Tim es X% más alto que Tom". I need to replace X with a computed number.
Is there an Angular filter that can do this? Something akin to
{{ translation.PhraseOne | replaceXWithY }}
If not, what would be the simplest way of achieving this? I don't really want to be having a translation file with partial strings.
Cheers!