Playframework Secure module and Internationalization
I'm using the standard Secure module from Play! 1.2.2.
In this discussion I've seen how to copy the view template for the Secure module:
play secure:ov --css
play secure:ov --login
play secure:ov --layout
or one can just copy yourself the relevant files to app/views/Secure
and /public/stylesheets
.
But my authentication should be in a different language than English. The error messages are in the module source, in the Play! distribution: models/secure/conf/messages
.
Is there any proper way of customising that file without touchi开发者_JS百科ng the module source itself? Creating a conf/secure/messages
in my application does not have any effect.
The message catalogue is not only used by the view - which I could easily change - but also by the Secure controller, when generating an error message. I'd like to avoid forking the Secure module just for these six messages.
Thanks for reading, Viktor.
The Secure module is usually "forked" and customized for many applications, don't be afraid to do so. In theory removing the keys from the models/secure/conf/messages and moving them to the app conf/messages should do it.
But if you have problems, just copy the contents of the module to your project. You are already customizing most of it (the look and feel) so copying 1 class, 1 annotation and 1 tag should be a bug deal :)
精彩评论