Search code examples
javascriptmeteormeteor-autoform

Meteor: How can I embed template tags within other template tags?


For example, I have an input field in my Meteor template:

{{> afQuickField name="mobile" options="auto" label="Your mobile number"}}

Then I start building an internationalised site, which means I need i18n the label text. Using anti:i18n, you can have internationalised text like this:

{{i18n "signup.form.mobile"}}

Now, how can I put this i18n-ed text into the previous template tag? I want something like

{{> afQuickField name="mobile" options="auto" label=(i18n 'signup.form.mobile')}}

but obviously it's wrong syntax.

Any idea?


Solution

  • Maybe almogdesign approach helps you further...

    https://github.com/aldeed/meteor-autoform/issues/483