I support several languages in my application and use React-intl for this. I have the Redux middleware where I make a call to the server and in the case of error I want to show an error on the UI.
I know that I can do something like:
1) dispatch an action from middleware with a message key:
{type: SHOW_ERROR, message: 'message_error_key'}
2) in my React component use:
<FormattedMessage id={this.props.message_error_key}/>
But is there a way to dispatch an action with already translated message from middleware?
{type: SHOW_ERROR, message: [translated_message_should_be_here]}