views:

21

answers:

1

I'm using Sprinng 3.0.

How do I find the current locale set by a LocaleResolver within an annotation-based controller?

Thanks.

+1  A: 

You can declare an argument of type Locale in your controller method:

@RequestMapping
public ModelAndView foo(..., Locale locale) { ... }

See also:

axtavt