ember.js - Ember i18n dynamic link inside of translation -
i wondering how pass link {{t}}
helper. using v3.0.1 of ember i18n @ moment.
obviously cannot pass link helper t helper (something like
{{ t "some-translation-string" link={{#link-to 'page' model}}page{{/link-to}} }}
won't work of course).
so thinking, maybe can create custom prop returns whole link. again, how create link?. know of method has same arguments link-to
helper, returns link (in case 'page'
, model
)?
you might able achieve basic link, doubt you'll able toss live link-to component inside translation.
so instead split translation string pieces:
{{t 'gotosettingpage-before'}} {{link-to (t 'gotosettingpage-link') 'route.name'}} {{t 'gotosettingpage-after'}}
'gotosettingpage-before': 'go to' 'gotosettingpage-link': 'settings' 'gotosettingpage-after': 'page.'
Comments
Post a Comment