Internationalization and spring security in thymeleaf
we need to implement internationalization and spring security using spring and thymeleaf in our project.
As per our requirement , locale will be a user input on login page. we've used a select drop down for languges. The form is being validated using spring security. It fails to get the selected language. As such, interntionalization is working fine. Also, spring security is working fine too. But together we aren't able to make them work, for we aren't able to pass selected language.
Following is the entry in dispatcher for locale:
class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename" value="locale/messages" /> </bean>
Re: Internationalization and spring security in thymeleaf
The LocaleChangeInterceptor has nothing to do with spring security. By passing ?selectedLanguage=fr to j_spring_security_check, the SecurityInterceptor is intercepting the call and bypassing the LocaleChangeInterceptor. Try passing ?selectedLanguage=fr to any URL but j_spring_security_check.