You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of doing compile, we do tagmap, which replaces tags with functions instead:
// Instead of this
$.t('pages.index.hello')
$.t('pages.index.hello', 'en')
// We do this
<t key="pages.index.hello">
<t key="pages.index.hello" lang="en">
// Instead of this
<a href="${$.link('hello')}">Hello</a>
<a href="${$.link('en@hello')}">Hello</a>
// We do this
<link name="hello">Hello</link>
<link name="hello" lang="en">Hello</link>
<link name="hello?id=${user_id}" lang="en">Hello</link>
What to do if we want to insert it as attributes?
<input value="<t key='pages.index.hello'>"> ?
Alternatives?
<input value="$t.pages.index.hello@en">
<a href="$link.hello">Hello</a>
<a href="$link.hello@en">Hello</a>
This is shorter and simpler. Completely safe.
How do we do this?
href="${$.link(`en@${$.page.name}`)}"
href="$link.${$.page.name}@en" ?
The text was updated successfully, but these errors were encountered:
Instead of doing
compile
, we dotagmap
, which replaces tags with functions instead:The text was updated successfully, but these errors were encountered: