public final class LocaleAccessor extends Object
Constructor and Description |
---|
LocaleAccessor() |
Modifier and Type | Method and Description |
---|---|
static Locale |
getCurrentLocale()
Returns the requested locale of the current HTTP request, or the server's default locale if called outside the
context of an HTTP request.
|
static List<Locale> |
getCurrentLocales()
Returns a list of Locale objects indicating, in decreasing order starting with the preferred locale, the locales
that are acceptable to the client based on the Accept-Language header.
|
static LocaleFacade |
getLocaleFacade() |
static void |
setLocaleFacade(LocaleFacade localeFacade)
Replaces the default
LocaleFacade instance. |
@Nonnull public static LocaleFacade getLocaleFacade()
LocaleFacade
instance. This method is for internal use only.public static void setLocaleFacade(@Nonnull LocaleFacade localeFacade)
LocaleFacade
instance. This method is for internal use only.@Nonnull public static Locale getCurrentLocale()
@Nonnull public static List<Locale> getCurrentLocales()
Copyright © 2018 SAP SE. All rights reserved.