Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

issuer with internationalization

 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i'm trying to use internationalization from spring.
i've an index.jsp containing a frame createUser.jsp, it stayes always with the default language. when i try to use this link: user/creationUser?lang=fr
it refreshes the page but the language stay french

my web.xml


my creationUser-context.xml


my controller


thanks for your help
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would not use the DefaultAnnotationHandlerMapping if you are using the newest Spring I would just remove that all together. You no longer have to register the interceptors on the handler mappings anymore either you can make it applicable for all controllers.




Are your message properties files properly named?

I see you are doing


Why would you expect that to not be french?
 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks

How can i make it applicable for all controllers? Where do i pu the lines, you gave?

It's really difficult to find a correct tutorial
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like I said replace



with




You will need the make sure the mvc namespace is defined in your context xml.
 
fabian verbeek
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your helpful answer.

But how can i do to intercept it for every page? Do i have to put this line in my all context xml or are there a way to make a context for all the application?

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic