Language for standard messages
Hi All !
I get a lot of error messages in my application, for example:
"Validation Error: Value is required. " or
"Validation Error: Value is less than allowable minimum of '2' "
It's ok, but how can I change language for these messages ?
For example I try this:
facesContext.getApplication().setDefaultLocale(Locale.GERMAN);
but the error messages remained english :(
xesj
[433 byte] By [
xesja] at [2007-11-26 23:44:32]

# 1
Hi All !
I solved this problem, so I write to you how I did that.
First I had to find that file, which contains standard error messages of JSF.
I saw the JSF uses two files: jsf-api.jar & jsf-impl.jar.
I unpacked them, and I saw one of them (jsf-impl.jar) contains properties files,
Messages.properties and this file for other languages.
Of course hungarian version of this file didn't exists :)
I changed some english messages to hungarian messages, and I renamed
file to Messages_hu.properties and saved into my project directory:
.../classes/valami_package/Messages_hu.properties
(Of course my default locale is "hu")
After I edited faces-config.xml, I wrote these lines into:
<application>
<message-bundle>
valami_package.Messages
</message-bundle>
</application>
Finally I recompiled & restarted my JSF-application,
and I saw my hungarian messages ! Victory :)
Bye, xesj
xesja at 2007-7-11 15:16:03 >
