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

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -