I’m trying to set up a norwegian version of a site built with JSF.
I know how to display my own messages based on what locale is set to, but I’m having trouble with the default messages (eg. when a form input is invalid). As far as I can tell, norwegian is not supported.
Does anyone know how I could overcome this?
e.g. by translating some property file myself
Thanks!
You’re doing almost the right thing, you just need to use the right property keys. The default messages.properties file is located in jsf-impl.jar (in the javax.faces package).
This contains all the messages, such as:
If you specify your own custom message file and use those same property keys, it will override the JSF defaults.
(See this blog post for more detail)