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(jakarta.servlet.http.HttpServletRequest request) Determine a user's locale from the given HttpServletRequest.static LocalegetUserLocale(javax.servlet.http.HttpServletRequest request) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
getUserLocale
@Deprecated(since="13.1", forRemoval=true) public static Locale getUserLocale(javax.servlet.http.HttpServletRequest request) Deprecated, for removal: This API element is subject to removal in a future version.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
-
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
-