This is not the behavior I'm experiencing,
and I use this approach all the time...
Perhaps (if you tried masking the ValidationStrings.properties file with a dutch one)
that file is still in your classpath, causing the behavior you describe...
So, there may still be a WEB-INF/classes/org/apache/tapestry/valid/ValidationStrings.properties file, as well as the WEB-INF/classes/org/apache/tapestry/valid/ValidationStrings_nl.properties
even if in your source folder there's only the latter.
If this is the case, just delete it (or delete all and recompile)...

Jan Vissers wrote:

Ok,... but it seems that my ValidationStrings_nl.properties gets in the way of the English version altogether. This leads to pages where the labels are localized in English and the JavaScript alert messages popup in Dutch. Clearly this is not what I want - I want the JavaScript messages to adhere to the current locale and get their messages from the appropriate property file. This doesn't seem to happen when I have ValidationStrings_nl in the WEB-INF/classes/org/apache/tapestry/valid!

What am I missing here ...?



Andreas Andreou wrote:

Jan Vissers wrote:

As a follow up question ...

I would prefer not masking other property files, for client side scripting. I want to be able to switch from languages and have the javascript message behave according to the selected language. How can I do this?

Hope anyone can help me out here!



Do what you've already done!
Add a ValidationStrings_nl.properties in WEB-INF/classes/org/apache/tapestry/valid It's the proper solution. That's why people have been submitting their localized ValidationStrings file into JIRA, in the hope that they'll sometime be included in the main Tapestry distro (or perhaps in an addin package). I even have localized messages
for many other components (such as contrib:Palette)
In the previous mail, I just informed you that you could even (= extreme case) mask the ValidationStrings.properties
file


-J.

Andreas Andreou wrote:

Jan Vissers wrote:

Answering my own question (I guess).

Have added ValidationStrings_nl.properties to my project and used ant to store it in WEB-INF/classes/org/apache/tapestry/valid

Seems to be working - not sure whether this is the way though. Confirmation would help :-)





Yep, it's correct...
You could have even named it ValidationStrings.properties, and it would have masked the one
in the jar...
While you're at it, why don't you attach it to jira?
(http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573)


-J.

Jan Vissers wrote:

Hi,

Is there a way to have clientScriptingEnabled and have localized messages for Java Script validation failures?

thx.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to