yuuvis® RAD Q&A

0 votes
by (820 points)

Hi,

I'm trying to translate some text in a typescript file (!= template) and need some replacement functionality. E.g. like "You selected {0} item(s)". Where the placemholder is inserted in the ts file. Proper plural handling is a plus.

String concatenation of the json text seems overly cumbersome. Is there any solution in eo-core?

TIA

Dennis

1 Answer

0 votes
by (18.5k points)

Use translate.instant('my.key', {param: 'value'})

https://github.com/ngx-translate/core

Related questions

0 votes
1 answer
asked Oct 9, 2019 by dcieplik (820 points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
asked Mar 27, 2023 by Martin Januschke (660 points)
...