简体   繁体   中英

Spring security: custom login form with locale

I need to develop custom login form which allows user to select language (locale). When user select locale from page has to reload and display in new locale. After page is submited (login button is pressed) then the selected locale has to be set to spring app.

I spent a lot of hours to googling some solution. unfortunatelly there is no working solution:-(((

Any ideas?

You could register a LocaleChangeInterceptor which allows the change of the users locale. Checkout the docs at http://static.springsource.org/spring/docs/3.0.x/reference/mvc.html#mvc-localeresolver

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM