Class DefaultLocaleFacade

java.lang.Object
com.sap.cloud.sdk.cloudplatform.servlet.DefaultLocaleFacade
All Implemented Interfaces:
LocaleFacade

public class DefaultLocaleFacade extends Object implements LocaleFacade
Facade for accessing Locale information. By default, the RequestHeaderAccessor is used to read the "Accept-Languages" HTTP header value(s) explicitly from the incoming request. As fallback the system default Locale will be chosen.
  • Constructor Details

    • DefaultLocaleFacade

      public DefaultLocaleFacade()
  • Method Details

    • getCurrentLocales

      @Nonnull public List<Locale> getCurrentLocales()
      Description copied from interface: LocaleFacade
      Returns a list of locales indicating, in decreasing order starting with the preferred locale, the locales that are acceptable to the client based on the Accept-Language header. If the client request doesn't provide an "Accept-Language" header, this method returns a list containing one locale, the default locale of the server.
      Specified by:
      getCurrentLocales in interface LocaleFacade
      Returns:
      A list of locales.