public class LanguageUtil
extends Object
Constructor and Description |
---|
LanguageUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
LanguageWrapper argument) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
LanguageWrapper[] arguments) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
LanguageWrapper[] arguments,
boolean translateArguments) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
LanguageWrapper argument,
boolean translateArguments) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
Object argument) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
Object[] arguments) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
Object[] arguments,
boolean translateArguments) |
static String |
format(javax.servlet.http.HttpServletRequest httpServletRequest,
String pattern,
Object argument,
boolean translateArguments) |
static String |
format(Locale locale,
String pattern,
List<Object> arguments) |
static String |
format(Locale locale,
String pattern,
Object argument) |
static String |
format(Locale locale,
String pattern,
Object[] arguments) |
static String |
format(Locale locale,
String pattern,
Object[] arguments,
boolean translateArguments) |
static String |
format(Locale locale,
String pattern,
Object argument,
boolean translateArguments) |
static String |
format(ResourceBundle resourceBundle,
String pattern,
Object argument) |
static String |
format(ResourceBundle resourceBundle,
String pattern,
Object[] arguments) |
static String |
format(ResourceBundle resourceBundle,
String pattern,
Object[] arguments,
boolean translateArguments) |
static String |
format(ResourceBundle resourceBundle,
String pattern,
Object argument,
boolean translateArguments) |
static String |
formatStorageSize(double size,
Locale locale) |
static String |
get(javax.servlet.http.HttpServletRequest httpServletRequest,
ResourceBundle resourceBundle,
String key) |
static String |
get(javax.servlet.http.HttpServletRequest httpServletRequest,
ResourceBundle resourceBundle,
String key,
String defaultValue) |
static String |
get(javax.servlet.http.HttpServletRequest httpServletRequest,
String key) |
static String |
get(javax.servlet.http.HttpServletRequest httpServletRequest,
String key,
String defaultValue) |
static String |
get(Locale locale,
String key) |
static String |
get(Locale locale,
String key,
String defaultValue) |
static String |
get(ResourceBundle resourceBundle,
String key) |
static String |
get(ResourceBundle resourceBundle,
String key,
String defaultValue) |
static Set<Locale> |
getAvailableLocales() |
static Set<Locale> |
getAvailableLocales(long groupId) |
static String |
getBCP47LanguageId(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getBCP47LanguageId(Locale locale) |
static String |
getBCP47LanguageId(javax.portlet.PortletRequest portletRequest) |
static Set<Locale> |
getCompanyAvailableLocales(long companyId) |
static Language |
getLanguage() |
static String |
getLanguageId(javax.servlet.http.HttpServletRequest httpServletRequest) |
static String |
getLanguageId(Locale locale) |
static String |
getLanguageId(javax.portlet.PortletRequest portletRequest) |
static long |
getLastModified() |
static Locale |
getLocale(long groupId,
String languageCode) |
static Locale |
getLocale(String languageCode) |
static ResourceBundleLoader |
getResourceBundleLoader() |
static Set<Locale> |
getSupportedLocales() |
static String |
getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest,
long milliseconds) |
static String |
getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest,
Long milliseconds) |
static String |
getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest,
long milliseconds,
boolean approximate) |
static String |
getTimeDescription(Locale locale,
long milliseconds) |
static String |
getTimeDescription(Locale locale,
Long milliseconds) |
static String |
getTimeDescription(Locale locale,
long milliseconds,
boolean approximate) |
static void |
init() |
static boolean |
isAvailableLanguageCode(String languageCode) |
static boolean |
isAvailableLocale(Locale locale) |
static boolean |
isAvailableLocale(long groupId,
Locale locale) |
static boolean |
isAvailableLocale(long groupId,
String languageId) |
static boolean |
isAvailableLocale(String languageId) |
static boolean |
isBetaLocale(Locale locale) |
static boolean |
isDuplicateLanguageCode(String languageCode) |
static boolean |
isInheritLocales(long groupId) |
static boolean |
isSameLanguage(Locale locale1,
Locale locale2) |
static String |
process(Supplier<ResourceBundle> resourceBundleSupplier,
Locale locale,
String content) |
static void |
resetAvailableGroupLocales(long groupId) |
static void |
resetAvailableLocales(long companyId) |
void |
setLanguage(Language language) |
static void |
updateCookie(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
Locale locale) |
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper argument)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper argument, boolean translateArguments)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper[] arguments)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, LanguageWrapper[] arguments, boolean translateArguments)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object argument)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object argument, boolean translateArguments)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object[] arguments)
public static String format(javax.servlet.http.HttpServletRequest httpServletRequest, String pattern, Object[] arguments, boolean translateArguments)
public static String format(Locale locale, String pattern, List<Object> arguments)
public static String format(Locale locale, String pattern, Object argument)
public static String format(Locale locale, String pattern, Object argument, boolean translateArguments)
public static String format(Locale locale, String pattern, Object[] arguments)
public static String format(Locale locale, String pattern, Object[] arguments, boolean translateArguments)
public static String format(ResourceBundle resourceBundle, String pattern, Object argument)
public static String format(ResourceBundle resourceBundle, String pattern, Object argument, boolean translateArguments)
public static String format(ResourceBundle resourceBundle, String pattern, Object[] arguments)
public static String format(ResourceBundle resourceBundle, String pattern, Object[] arguments, boolean translateArguments)
public static String formatStorageSize(double size, Locale locale)
public static String get(javax.servlet.http.HttpServletRequest httpServletRequest, ResourceBundle resourceBundle, String key)
public static String get(javax.servlet.http.HttpServletRequest httpServletRequest, ResourceBundle resourceBundle, String key, String defaultValue)
public static String get(javax.servlet.http.HttpServletRequest httpServletRequest, String key)
public static String get(javax.servlet.http.HttpServletRequest httpServletRequest, String key, String defaultValue)
public static String get(Locale locale, String key)
public static String get(Locale locale, String key, String defaultValue)
public static String get(ResourceBundle resourceBundle, String key)
public static String get(ResourceBundle resourceBundle, String key, String defaultValue)
public static Set<Locale> getAvailableLocales()
public static Set<Locale> getAvailableLocales(long groupId)
public static String getBCP47LanguageId(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getBCP47LanguageId(Locale locale)
public static String getBCP47LanguageId(javax.portlet.PortletRequest portletRequest)
public static Set<Locale> getCompanyAvailableLocales(long companyId)
public static Language getLanguage()
public static String getLanguageId(javax.servlet.http.HttpServletRequest httpServletRequest)
public static String getLanguageId(Locale locale)
public static String getLanguageId(javax.portlet.PortletRequest portletRequest)
public static long getLastModified()
public static Locale getLocale(long groupId, String languageCode)
public static Locale getLocale(String languageCode)
public static ResourceBundleLoader getResourceBundleLoader()
public static Set<Locale> getSupportedLocales()
public static String getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, long milliseconds)
public static String getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, long milliseconds, boolean approximate)
public static String getTimeDescription(javax.servlet.http.HttpServletRequest httpServletRequest, Long milliseconds)
public static String getTimeDescription(Locale locale, long milliseconds)
public static String getTimeDescription(Locale locale, long milliseconds, boolean approximate)
public static String getTimeDescription(Locale locale, Long milliseconds)
public static void init()
public static boolean isAvailableLanguageCode(String languageCode)
public static boolean isAvailableLocale(Locale locale)
public static boolean isAvailableLocale(long groupId, Locale locale)
public static boolean isAvailableLocale(long groupId, String languageId)
public static boolean isAvailableLocale(String languageId)
public static boolean isBetaLocale(Locale locale)
public static boolean isDuplicateLanguageCode(String languageCode)
public static boolean isInheritLocales(long groupId) throws PortalException
PortalException
public static boolean isSameLanguage(Locale locale1, Locale locale2)
public static String process(Supplier<ResourceBundle> resourceBundleSupplier, Locale locale, String content)
public static void resetAvailableGroupLocales(long groupId)
public static void resetAvailableLocales(long companyId)
public static void updateCookie(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Locale locale)
public void setLanguage(Language language)