I don't know exactly what are you asking , hopefully you want to do internationalization
below are code which set default language in spring with internationalization
For complete code you can refer
Here
But this is on my assumption , if it is different than what you are asking , please clarify your question a bit more.