PDA

View Full Version : Getting the Locale inside my validator


forgoodorforawesome
Apr 24th, 2006, 12:49 PM
Hi,

I am trying to get the current Locale to use inside a validator I am writing. Since the request is not passed into a validator, is there anyway I can get the Locale?

Thanks in advance.

laenzlinger
Apr 24th, 2006, 03:43 PM
Are you using Spring MVC?

Try LocaleContextHolder.getLocale()

/christof

forgoodorforawesome
Apr 25th, 2006, 11:27 AM
Thanks! That's exactly what I needed.