sails: `defaultLocale` option in `i18n.js` is not working , always use the `en` locale
I try to set defaultLocale as other languages, say defaultLocale: 'de', but it is not working, unless I set the locale specially in controller as res.setLocale('de'), it will use the right locale.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 20 (10 by maintainers)
I temporarily solve this by add
res.setLocale(sails.config.i18n.defaultLocale);toi18n hook, as below:Any better solution to this?