From the course: Spring: Spring MVC

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Automatic locale resolution demo

Automatic locale resolution demo

From the course: Spring: Spring MVC

Start my 1-month free trial

Automatic locale resolution demo

- [Instructor] So let's get into a demo of finding out how automatic locale resolution will work for your application. In the previous slide, we quickly discussed that accept header locale resolver is the default implementation that's provided to you by the spring MVC framework. So let's go ahead in the project. And the first step is to add message property files for different locales on class path. So let's go under Resources. And inside this I'm going to create a new file. Let's call this messages.property. So that's the default name that spring MVC expects. And I'm going to create another file which will be called like this. Messages_ S3. Now S3 is for the Swedish language. The file that I created earlier is for the default language which is English. So this will be named, messages_SV.properties. So tomorrow, let's say you have to enable French language in your application. You will have to create one more…

Contents