Closed ericf closed 10 years ago
+1
In your example I'm confused about where @intl.formats
comes from. Is this something that is setup by the {{#intl}}
block? Would @i18n.formats.number.usd
have done the same thing?
@drewfish i18n
is a context variable, and what is passed into the intl
block is a member of it, so intlNumber
doens't have access to that variable. Basically, {{#intl locales=i18n.locales formats=i18n.formats}}
means we will have data.intl.formats
as the entry point for @
references.
But it is true that you could do:
{{intlNumber 1000 i18n.formats.number.usd}}
without having to do the intl block (assuming the locales is in place)
OK cool. It was just confusing having both intl
and i18n
and understanding the relationship between the two.
Okay, updated the example in the description to only use intl
.
This allows for the following:
server.js:
template.hbs: