Open iremlopsum opened 6 years ago
For example if I have
helloString = 'Hello, {{name}}, how is your {{timeOfTheDay}}?'
I could do I18n.t('helloString', { name: Julie, timeOfTheDay: 'morning' });
I18n.t('helloString', { name: Julie, timeOfTheDay: 'morning' });
But what I would love to do is something like I18n.t('helloString', (variables) => variables.map(var => this.state[var])
I18n.t('helloString', (variables) => variables.map(var => this.state[var])
this way I can automate variable logic for forms based on previous entries.
For example if I have
helloString = 'Hello, {{name}}, how is your {{timeOfTheDay}}?'
I could do
I18n.t('helloString', { name: Julie, timeOfTheDay: 'morning' });
But what I would love to do is something like
I18n.t('helloString', (variables) => variables.map(var => this.state[var])
this way I can automate variable logic for forms based on previous entries.