public class UnicodeLanguageImpl
extends java.lang.Object
implements com.liferay.portal.kernel.language.UnicodeLanguage
LanguageImpl
Constructor and Description |
---|
UnicodeLanguageImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
com.liferay.portal.kernel.language.LanguageWrapper argument)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
com.liferay.portal.kernel.language.LanguageWrapper[] arguments)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
com.liferay.portal.kernel.language.LanguageWrapper[] arguments,
boolean translateArguments)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
com.liferay.portal.kernel.language.LanguageWrapper argument,
boolean translateArguments)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
java.lang.Object argument)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
java.lang.Object[] arguments)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
java.lang.Object[] arguments,
boolean translateArguments)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(javax.servlet.http.HttpServletRequest request,
java.lang.String pattern,
java.lang.Object argument,
boolean translateArguments)
Returns the translated pattern in unicode using the current request's
locale or, if the current request locale is not available, the server's
default locale.
|
java.lang.String |
format(java.util.Locale locale,
java.lang.String pattern,
java.lang.Object argument)
Returns the translated pattern in unicode using the locale or, if the
locale is not available, the server's default locale.
|
java.lang.String |
format(java.util.Locale locale,
java.lang.String pattern,
java.lang.Object[] arguments)
Returns the translated pattern in unicode using the locale or, if the
locale is not available, the server's default locale.
|
java.lang.String |
format(java.util.Locale locale,
java.lang.String pattern,
java.lang.Object[] arguments,
boolean translateArguments)
Returns the translated pattern in unicode using the locale or, if the
locale is not available, the server's default locale.
|
java.lang.String |
format(java.util.Locale locale,
java.lang.String pattern,
java.lang.Object argument,
boolean translateArguments)
Returns the translated pattern in unicode using the locale or, if the
locale is not available, the server's default locale.
|
java.lang.String |
format(java.util.ResourceBundle resourceBundle,
java.lang.String pattern,
java.lang.Object argument)
Returns the translated pattern in the resource bundle in unicode or, if
the resource bundle is not available, the untranslated key in unicode.
|
java.lang.String |
format(java.util.ResourceBundle resourceBundle,
java.lang.String pattern,
java.lang.Object[] arguments)
Returns the translated pattern in the resource bundle in unicode or, if
the resource bundle is not available, the untranslated key in unicode.
|
java.lang.String |
format(java.util.ResourceBundle resourceBundle,
java.lang.String pattern,
java.lang.Object[] arguments,
boolean translateArguments)
Returns the translated pattern in the resource bundle in unicode or, if
the resource bundle is not available, the untranslated key in unicode.
|
java.lang.String |
format(java.util.ResourceBundle resourceBundle,
java.lang.String pattern,
java.lang.Object argument,
boolean translateArguments)
Returns the translated pattern in the resource bundle in unicode or, if
the resource bundle is not available, the untranslated key in unicode.
|
java.lang.String |
get(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
Returns the key's translation from the portlet configuration in unicode,
or from the portal's resource bundle if the portlet configuration is
unavailable.
|
java.lang.String |
get(javax.servlet.http.HttpServletRequest request,
java.lang.String key,
java.lang.String defaultValue)
Returns the key's translation from the portlet configuration in unicode,
or from the portal's resource bundle if the portlet configuration is
unavailable.
|
java.lang.String |
get(java.util.Locale locale,
java.lang.String key)
Returns the key's translation from the portal's resource bundle in
unicode.
|
java.lang.String |
get(java.util.Locale locale,
java.lang.String key,
java.lang.String defaultValue)
Returns the key's translation from the portal's resource bundle in
unicode.
|
java.lang.String |
get(java.util.ResourceBundle resourceBundle,
java.lang.String key)
Returns the key's translation from the resource bundle in unicode.
|
java.lang.String |
get(java.util.ResourceBundle resourceBundle,
java.lang.String key,
java.lang.String defaultValue)
Returns the key's translation from the resource bundle in unicode.
|
java.lang.String |
getTimeDescription(javax.servlet.http.HttpServletRequest request,
long milliseconds)
Returns an exact localized description in unicode of the time interval
(in milliseconds) in the largest unit possible.
|
java.lang.String |
getTimeDescription(javax.servlet.http.HttpServletRequest request,
java.lang.Long milliseconds)
Returns an exact localized description in unicode of the time interval
(in milliseconds) in the largest unit possible.
|
public java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, com.liferay.portal.kernel.language.LanguageWrapper argument)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.argument
- the single argument to be substituted into the pattern
and translated, if possiblepublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, com.liferay.portal.kernel.language.LanguageWrapper argument, boolean translateArguments)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.argument
- the single argument to be substituted into the pattern
and translated, if possibletranslateArguments
- whether the argument is translatedpublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, com.liferay.portal.kernel.language.LanguageWrapper[] arguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.arguments
- the arguments to be substituted into the pattern and
translated, if possiblepublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, com.liferay.portal.kernel.language.LanguageWrapper[] arguments, boolean translateArguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.arguments
- the arguments to be substituted into the patterntranslateArguments
- whether the arguments are translatedpublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, java.lang.Object argument)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.argument
- the single argument to be substituted into the pattern
and translated, if possiblepublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, java.lang.Object argument, boolean translateArguments)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.argument
- the single argument to be substituted into the pattern
and translated, if possibletranslateArguments
- whether the argument is translatedpublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, java.lang.Object[] arguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.arguments
- the arguments to be substituted into the pattern and
translated, if possiblepublic java.lang.String format(javax.servlet.http.HttpServletRequest request, java.lang.String pattern, java.lang.Object[] arguments, boolean translateArguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localepattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.arguments
- the arguments to be substituted into the patterntranslateArguments
- whether the arguments are translatedpublic java.lang.String format(java.util.Locale locale, java.lang.String pattern, java.lang.Object argument)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
locale
- the locale to translate topattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.argument
- the argument to be substituted into the patternpublic java.lang.String format(java.util.Locale locale, java.lang.String pattern, java.lang.Object argument, boolean translateArguments)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
locale
- the locale to translate topattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.argument
- the argument to be substituted into the patterntranslateArguments
- whether the argument is translatedpublic java.lang.String format(java.util.Locale locale, java.lang.String pattern, java.lang.Object[] arguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
locale
- the locale to translate topattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.arguments
- the arguments to be substituted into the patternpublic java.lang.String format(java.util.Locale locale, java.lang.String pattern, java.lang.Object[] arguments, boolean translateArguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
locale
- the locale to translate topattern
- the key to look up in the current locale's resource file.
The key follows the standard Java resource specification.arguments
- the arguments to be substituted into the patterntranslateArguments
- whether the arguments are translatedpublic java.lang.String format(java.util.ResourceBundle resourceBundle, java.lang.String pattern, java.lang.Object argument)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
resourceBundle
- the requested key's resource bundlepattern
- the key to look up in the resource bundle. The key
follows the standard Java resource specification.argument
- the argument to be substituted into the patternpublic java.lang.String format(java.util.ResourceBundle resourceBundle, java.lang.String pattern, java.lang.Object argument, boolean translateArguments)
The substitute placeholder (e.g. {0}
) is replaced with the
argument, following the standard Java ResourceBundle
notion of
index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
resourceBundle
- the requested key's resource bundlepattern
- the key to look up in the resource bundle. The key
follows the standard Java resource specification.argument
- the argument to be substituted into the patterntranslateArguments
- whether the argument is translatedpublic java.lang.String format(java.util.ResourceBundle resourceBundle, java.lang.String pattern, java.lang.Object[] arguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
resourceBundle
- the requested key's resource bundlepattern
- the key to look up in the resource bundle. The key
follows the standard Java resource specification.arguments
- the arguments to be substituted into the patternpublic java.lang.String format(java.util.ResourceBundle resourceBundle, java.lang.String pattern, java.lang.Object[] arguments, boolean translateArguments)
The substitute placeholders (e.g. {0}
, {1}
,
{2}
, etc.) are replaced with the arguments, following the
standard Java ResourceBundle
notion of index based substitution.
format
in interface com.liferay.portal.kernel.language.UnicodeLanguage
resourceBundle
- the requested key's resource bundlepattern
- the key to look up in the resource bundle. The key
follows the standard Java resource specification.arguments
- the arguments to be substituted into the patterntranslateArguments
- whether the arguments are translatedpublic java.lang.String get(javax.servlet.http.HttpServletRequest request, java.lang.String key)
get
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the key's context and
localekey
- the translation keypublic java.lang.String get(javax.servlet.http.HttpServletRequest request, java.lang.String key, java.lang.String defaultValue)
get
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the key's context and
localekey
- the translation keydefaultValue
- the value to return if there is no matching
translationpublic java.lang.String get(java.util.Locale locale, java.lang.String key)
get
in interface com.liferay.portal.kernel.language.UnicodeLanguage
locale
- the key's localekey
- the translation keypublic java.lang.String get(java.util.Locale locale, java.lang.String key, java.lang.String defaultValue)
get
in interface com.liferay.portal.kernel.language.UnicodeLanguage
locale
- the key's localekey
- the translation keydefaultValue
- the value to return if there is no matching
translationpublic java.lang.String get(java.util.ResourceBundle resourceBundle, java.lang.String key)
get
in interface com.liferay.portal.kernel.language.UnicodeLanguage
resourceBundle
- the requested key's resource bundlekey
- the translation keypublic java.lang.String get(java.util.ResourceBundle resourceBundle, java.lang.String key, java.lang.String defaultValue)
get
in interface com.liferay.portal.kernel.language.UnicodeLanguage
resourceBundle
- the requested key's resource bundlekey
- the translation keydefaultValue
- the value to return if there is no matching
translationpublic java.lang.String getTimeDescription(javax.servlet.http.HttpServletRequest request, long milliseconds)
For example, the following time intervals would be converted to the following time descriptions, using the English locale:
getTimeDescription
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localemilliseconds
- the time interval in milliseconds to describepublic java.lang.String getTimeDescription(javax.servlet.http.HttpServletRequest request, java.lang.Long milliseconds)
For example, the following time intervals would be converted to the following time descriptions, using the English locale:
getTimeDescription
in interface com.liferay.portal.kernel.language.UnicodeLanguage
request
- the request used to determine the current localemilliseconds
- the time interval in milliseconds to describe