views:

103

answers:

1

How do I get NHibernate Validator to use other language than English for it's messages? There are several languages included, but I always get my messages in English. I have tried setting culture but nothing helps. Any help?

regards, Jan

A: 

How are you setting the culture? I guess you need to set both .. culture and UI culture

Thread.CurrentThread.CurrentUICulture = culture;
Thread.CurrentThread.CurrentCulture = culture;
Michal
I'm changing the culture through browser language setting. I'm using "de_DE" since de is included in the validator. I'm also checking in the code that the correct culture is set, and both CurrentCulture and CurrentUICulture are correct. I just don't understand how to get NHibernate Validator to use the culture. I've checked the validators source code and the tests but I can still not find a way.
Jan
hmm. i am stuck here then too cause it works well for me. Validator should actually pick up the threads culture
Michal
maybe that helps u: http://nhforge.org/wikis/howtonh/create-a-custom-message-interpolator-for-nhibernate-validator.aspx it's the only article i found about i18n with the validator
Michal