APSL / redux-i18n

A simple and powerful package for translate your react applications using react-redux.
MIT License
233 stars 52 forks source link

Redux-i18n accessing t() function outside React components, e.g. in action creators #85

Open Mani79393 opened 6 years ago

Mani79393 commented 6 years ago

I'm using Redux-i18n inside my React components. Works as designed. Now, I have several business logic as separate functions within my action creator files. This includes additional error handling and validity checks. Some of them are display other are sent by eMail. At this point I know the user / recipient and want to show them the message / mail in their preferred language. I use templates in the backend of course, but I have certain attributes from the application I want to add and translate.

For this reason, I'd like to translate the messages in the action creators. Is there a way to access the translate literals handy like in the components with the t() function?

pathfinder2104 commented 5 years ago

Any updates on this? I am facing similar issue, I have filed an issue here, this is the link.