Package com.pingidentity.sdk.locale
Class LocaleUtil
java.lang.Object
com.pingidentity.sdk.locale.LocaleUtil
Utility class containing locale related helper functions.
- Since:
- 9.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalegetUserLocale(javax.servlet.http.HttpServletRequest request) Determine a user's locale from the given HttpServletRequest.
-
Method Details
-
getUserLocale
Determine a user's locale from the given HttpServletRequest. How the locale is chosen depends on the underlying configuration within PingFederate which may involve reading the Accept-Language request header, reading a cookie value or logic defined in a customLocaleOverrideService.The locale returned may then be used to localize the user interface using
LanguagePackMessagesandTemplateRendererUtil.- Parameters:
request- The HttpServletRequest from the user's browser.- Returns:
- The user's preferred locale.
- Since:
- 9.0
-