- Mastering Spring 5.0
- Ranga Rao Karanam
- 98字
- 2021-07-02 22:12:19
Internationalization
When we develop applications, we would want them to be usable in multiple locales. You would want the text that is shown to the user to be customized based on the location and language of the user. This is called internationalization. Internationalization, i18n, is also called Localization.
It can be implemented using two approaches:
- SessionLocaleResolver
- CookieLocaleResolver
In the case of SessionLocaleResolver, the locale chosen by the user is stored in the user session and, therefore, is valid for the user session only. However, in the case of a CookieLocaleResolver, the locale chosen is stored as a cookie.