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 Details

    • 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 custom LocaleOverrideService.

      The locale returned may then be used to localize the user interface using LanguagePackMessages and TemplateRendererUtil.

      Parameters:
      request - The HttpServletRequest from the user's browser.
      Returns:
      The user's preferred locale.
      Since:
      9.0