Class LanguageUtil
Object
com.liferay.portal.kernel.language.LanguageUtil
- Author:
- Brian Wing Shun Chan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringformat(ResourceBundle resourceBundle, String pattern, Object argument) static Stringformat(ResourceBundle resourceBundle, String pattern, Object[] arguments) static Stringformat(ResourceBundle resourceBundle, String pattern, Object[] arguments, boolean translateArguments) static Stringformat(ResourceBundle resourceBundle, String pattern, Object argument, boolean translateArguments) static Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper argument) static Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper[] arguments) static Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper[] arguments, boolean translateArguments) static Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper argument, boolean translateArguments) static Stringstatic Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object[] arguments) static Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object[] arguments, boolean translateArguments) static Stringformat(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object argument, boolean translateArguments) static StringformatStorageSize(double size, Locale locale) static Stringstatic Stringstatic Stringget(ResourceBundle resourceBundle, String key) static Stringget(ResourceBundle resourceBundle, String key, String defaultValue) static Stringstatic Stringstatic Stringget(javax.servlet.http.HttpServletRequest httpServletRequest, ResourceBundle resourceBundle, String key) static Stringget(javax.servlet.http.HttpServletRequest httpServletRequest, ResourceBundle resourceBundle, String key, String defaultValue) getAvailableLocales(long groupId) static StringgetBCP47LanguageId(Locale locale) static StringgetBCP47LanguageId(PortletRequest portletRequest) static StringgetBCP47LanguageId(javax.servlet.http.HttpServletRequest httpServletRequest) getCompanyAvailableLocales(long companyId) static Languagestatic StringgetLanguageId(Locale locale) static StringgetLanguageId(PortletRequest portletRequest) static StringgetLanguageId(javax.servlet.http.HttpServletRequest httpServletRequest) static longstatic Localestatic Localestatic ResourceBundleLoaderstatic StringgetTimeDescription(Locale locale, long milliseconds) static StringgetTimeDescription(Locale locale, long milliseconds, boolean approximate) static StringgetTimeDescription(Locale locale, Long milliseconds) static StringgetTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, long milliseconds) static StringgetTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, long milliseconds, boolean approximate) static StringgetTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, Long milliseconds) static voidinit()static booleanisAvailableLanguageCode(String languageCode) static booleanisAvailableLocale(long groupId, String languageId) static booleanisAvailableLocale(long groupId, Locale locale) static booleanisAvailableLocale(String languageId) static booleanisAvailableLocale(Locale locale) static booleanisBetaLocale(Locale locale) static booleanisDuplicateLanguageCode(String languageCode) static booleanisInheritLocales(long groupId) static booleanisSameLanguage(Locale locale1, Locale locale2) static Stringprocess(Supplier<ResourceBundle> resourceBundleSupplier, Locale locale, String content) static voidresetAvailableGroupLocales(long groupId) static voidresetAvailableLocales(long companyId) voidsetLanguage(Language language) static voidupdateCookie(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Locale locale)
-
Constructor Details
-
LanguageUtil
public LanguageUtil()
-
-
Method Details
-
format
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper argument) -
format
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper argument, boolean translateArguments) -
format
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper[] arguments) -
format
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper[] arguments, boolean translateArguments) -
format
-
format
-
format
-
format
-
format
-
format
-
format
-
format
-
format
-
format
-
format
public static String format(ResourceBundle resourceBundle, String pattern, Object argument, boolean translateArguments) -
format
-
format
public static String format(ResourceBundle resourceBundle, String pattern, Object[] arguments, boolean translateArguments) -
formatStorageSize
-
get
public static String get(javax.servlet.http.HttpServletRequest httpServletRequest, ResourceBundle resourceBundle, String key) -
get
public static String get(javax.servlet.http.HttpServletRequest httpServletRequest, ResourceBundle resourceBundle, String key, String defaultValue) -
get
-
get
-
get
-
get
-
get
-
get
-
getAvailableLocales
-
getAvailableLocales
-
getBCP47LanguageId
-
getBCP47LanguageId
-
getBCP47LanguageId
-
getCompanyAvailableLocales
-
getLanguage
-
getLanguageId
-
getLanguageId
-
getLanguageId
-
getLastModified
public static long getLastModified() -
getLocale
-
getLocale
-
getResourceBundleLoader
-
getSupportedLocales
-
getTimeDescription
public static String getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, long milliseconds) -
getTimeDescription
public static String getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, long milliseconds, boolean approximate) -
getTimeDescription
-
getTimeDescription
-
getTimeDescription
-
getTimeDescription
-
init
public static void init() -
isAvailableLanguageCode
-
isAvailableLocale
-
isAvailableLocale
-
isAvailableLocale
-
isAvailableLocale
-
isBetaLocale
-
isDuplicateLanguageCode
-
isInheritLocales
- Throws:
PortalException
-
isSameLanguage
-
process
public static String process(Supplier<ResourceBundle> resourceBundleSupplier, Locale locale, String content) -
resetAvailableGroupLocales
public static void resetAvailableGroupLocales(long groupId) -
resetAvailableLocales
public static void resetAvailableLocales(long companyId) -
updateCookie
public static void updateCookie(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Locale locale) -
setLanguage
-