springboot localization | springboot i18n | springboot internalization | live demo | okay java

preview_player
Показать описание
springboot localization | springboot i18n | springboot internalization | live demo | springboot thymeleaf | okay java
The LocaleResolver interface deals with locale resolution required when localizing web applications to specific locales.

SessionLocaleResolver
Resolves the locale and stores it in the HttpSession of the user. But as you might have wondered, yes, the resolved locale data is persisted only for as long as the session is live.

an interceptor – or interceptor? – bean that will intercept each request that the application receives, and eagerly check for a localeData parameter (language) on the HTTP request. If found, the interceptor uses the localeResolver

void addInterceptors - Override the addInterceptors method and add our locale change interceptor to the registry.
Рекомендации по теме
Комментарии
Автор

Can we use more than 1 Resolver like AcceptHeaderLocaleResolver and SessionLocaleResolver in one application ?

jitendrapatil
visit shbcf.ru