How to translate from function?
-
How to translate from function?
Thanks.
-
This post is deleted!
-
When inside
{{#each
the context ofthis
changes to the particular item, but the$localizedResource
is an attribute on the root context.You can get to the root context in handlebars like this
function returnType(type, options) { const resources = options.data.root.$localizedResource }
Or like this
{{{returnType transactionType @root}}}
function returnType(type, root) { const resources = root.$localizedResource }
-
It worked! Thanks!