Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using formatMessage in a loop construct #83

Open
vcatalano opened this issue Oct 18, 2016 · 0 comments
Open

Using formatMessage in a loop construct #83

vcatalano opened this issue Oct 18, 2016 · 0 comments

Comments

@vcatalano
Copy link

There doesn't appear to be a way to use the formatMessage directive in a loop construct with messages containing variable numbers of arguments. For example, I have an array containing messages, however, each message does not take the same arguments:

{{#messages}}
  {{formatMessage (intlGet messageText)
      num=??
      ago=??}}
{{/messages}}
var messages = [
  { messageText: "Welcome, {user}!" },
  { messageText: "How are you today, {firstName} {lastName}?" }
];

Is it possible to handle dynamic arguments with the formatMessage directive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant