@ProviderType
public class LanguageUtil
extends Object
Constructor and Description |
---|
LanguageUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
LanguageWrapper argument) |
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
LanguageWrapper[] arguments) |
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
LanguageWrapper[] arguments,
boolean translateArguments) |
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
LanguageWrapper argument,
boolean translateArguments) |
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
Object argument) |
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
Object[] arguments) |
static String |
format(javax.servlet.http.HttpServletRequest request,
String pattern,
Object[] arguments,
boolean translateArguments) |
static String |
format(javax.servlet.http.HttpServletRequest request,
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 |
get(javax.servlet.http.HttpServletRequest request,
ResourceBundle resourceBundle,
String key) |
static String |
get(javax.servlet.http.HttpServletRequest request,
ResourceBundle resourceBundle,
String key,
String defaultValue) |
static String |
get(javax.servlet.http.HttpServletRequest request,
String key) |
static String |
get(javax.servlet.http.HttpServletRequest request,
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 request) |
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 request) |
static String |
getLanguageId(Locale locale) |
static String |
getLanguageId(javax.portlet.PortletRequest portletRequest) |
static Locale |
getLocale(long groupId,
String languageCode) |
static Locale |
getLocale(String languageCode) |
static ResourceBundleLoader |
getPortalResourceBundleLoader() |
static Set<Locale> |
getSupportedLocales() |
static String |
getTimeDescription(javax.servlet.http.HttpServletRequest request,
long milliseconds) |
static String |
getTimeDescription(javax.servlet.http.HttpServletRequest request,
Long milliseconds) |
static String |
getTimeDescription(javax.servlet.http.HttpServletRequest request,
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 boolean |
isValidLanguageKey(Locale locale,
String key) |
static String |
process(ResourceBundle resourceBundle,
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 request,
javax.servlet.http.HttpServletResponse response,
Locale locale) |
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, LanguageWrapper argument)
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, LanguageWrapper argument, boolean translateArguments)
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, LanguageWrapper[] arguments)
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, LanguageWrapper[] arguments, boolean translateArguments)
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, Object argument)
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, Object argument, boolean translateArguments)
public static String format(javax.servlet.http.HttpServletRequest request, String pattern, Object[] arguments)
public static String format(javax.servlet.http.HttpServletRequest request, 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 get(javax.servlet.http.HttpServletRequest request, ResourceBundle resourceBundle, String key)
public static String get(javax.servlet.http.HttpServletRequest request, ResourceBundle resourceBundle, String key, String defaultValue)
public static String get(javax.servlet.http.HttpServletRequest request, String key)
public static String get(javax.servlet.http.HttpServletRequest request, 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 request)
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 request)
public static String getLanguageId(Locale locale)
public static String getLanguageId(javax.portlet.PortletRequest portletRequest)
public static Locale getLocale(long groupId, String languageCode)
public static Locale getLocale(String languageCode)
public static ResourceBundleLoader getPortalResourceBundleLoader()
public static Set<Locale> getSupportedLocales()
public static String getTimeDescription(javax.servlet.http.HttpServletRequest request, long milliseconds)
public static String getTimeDescription(javax.servlet.http.HttpServletRequest request, long milliseconds, boolean approximate)
public static String getTimeDescription(javax.servlet.http.HttpServletRequest request, 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 boolean isValidLanguageKey(Locale locale, String key)
public static String process(ResourceBundle resourceBundle, Locale locale, String content)
public static void resetAvailableGroupLocales(long groupId)
public static void resetAvailableLocales(long companyId)
public static void updateCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Locale locale)
public void setLanguage(Language language)