Package com.pingidentity.sdk.locale
Class LocaleUtil
- java.lang.Object
-
- com.pingidentity.sdk.locale.LocaleUtil
-
public final class LocaleUtil extends Object
Utility class containing locale related helper functions.- Since:
- 9.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocalegetUserLocale(javax.servlet.http.HttpServletRequest request)Determine a user's locale from the given HttpServletRequest.
-
-
-
Method Detail
-
getUserLocale
public static Locale getUserLocale(javax.servlet.http.HttpServletRequest request)
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
-
-