Is it possible to call a translation dynamically using interpolation in a template? I'd like to get something like that from this version:
<label for="{{media.type}}">{{t 'social.labels.twitter'}}</label>
to the below one using interpolation:
<label for="{{media.type}}">{{t 'social.labels.'{{model.some_media_name}}}}</label>
As you see, I' like to call a label translation for a specified social media based on its model value. The above snippet does not work. Any ideas ? Thank you
I fond the answer at one of ember-i18n issues, you should just use
concatfunction as follows:What will look for a translation key
social.labels.twiiterin case ofmedia.typeequals totwitter.