Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-1527: Internationalize one of the sample applications #1768

Closed
spring-projects-issues opened this issue Aug 2, 2010 · 6 comments
Closed
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Luke Taylor (Migrated from SEC-1527) said:

People get confused because Spring Security's filters don't automatically suppport i18n, even when it is working in Spring MVC. Adding support to one of the sample applications would provide a useful reference.

@spring-projects-issues
Copy link
Author

Luke Taylor said:

I've added the message bundle to the app context to make the default security messages available and added a RequestContextFilter to web.xml to set the LocaleContextHolder. Tested with Chinese locale for login failure.

@spring-projects-issues
Copy link
Author

Nirwan said:

hello Luke,

First of all thanks for creating the sample - it was helpful however such a spring beginner like me can't understand it easily. Could you please let me know how am i supposed to change the locale in your application - what is the responsible code? I tracked your change (compared versions of the sample before and after you created the example) what I found out is that you've created the new filter and are reading the locale somewhere on the website. The question is how to change it using the url... something like: http://someserver.com/bla/home?locale=en. The normal way (locale interceptors) dont work together with the spring security and the filter you added seems not to care at all about the URL change. Any tips?

For details please look at: http://stackoverflow.com/questions/8478321/spring-security-i18n-how-to-make-it-work-together

Thanks again for your great work!
Best Regards,
N.

@spring-projects-issues
Copy link
Author

Paul Babachanakh said:

Hello Luke,

Very thanks for this interesting sample.
But it would be very helpful to add to this sample how to implement internationalization and localization for Spring Security on login page.
I mean that I want to have change locale on the login page and get error message on the login page accordingly to this locale.
I trying to implement my own decision for this problem, but it always get messages in system locale.

Thank you
Pavel

@spring-projects-issues spring-projects-issues added Samples type: enhancement A general enhancement type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 3.1.0.M1 milestone Feb 5, 2016
@rajadileepkolli
Copy link

Where is the sample available?? Can we create an hyperlink so that users can refer it

@viksharma31
Copy link

hi luke,

Could you please provide any link to the sample or config code for this ?

Thanks

@php-coder
Copy link
Contributor

I'm also interested in having such example.

CC @rwinch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

5 participants