public final class L10n extends java.lang.Object implements L10nPackProviderI
This class implements L10nPackProviderI
, indicating its role
in providing localization packs. It encapsulates common L10n operations,
aiming to simplify the process of retrieving, formatting, and managing
localized strings within the application.
Modifier and Type | Class and Description |
---|---|
static class |
L10n.SimpleL10nLocaleProvider |
static class |
L10n.UnresolvedMessage |
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
defaultLocaleLock
If the default locale is changed in a multithreaded environment via
setDefaultLocale() this will
influence all threads of course, as it is a global value. |
static java.util.regex.Pattern |
l10nTagPattern |
static java.lang.String |
PACK_SEPARATOR |
static java.util.regex.Pattern |
validBundleNamePattern
A compiled regular expression Pattern that defines the set of characters
considered valid for L10n bundle names.
|
static java.util.regex.Pattern |
validPackagePattern
A compiled regular expression Pattern that defines the set of characters
considered valid for package names.
|
static java.lang.String |
validResourceKeyChars
A constant String defining the set of characters considered valid for L10n resource keys.
|
static java.util.regex.Pattern |
validResourceKeyPattern
A compiled regular expression Pattern that defines the set of characters
considered valid for L10n resource keys.
|
Modifier and Type | Method and Description |
---|---|
static void |
activateCompilePathDebugging() |
static void |
activateMsgDebugging() |
static void |
activateMsgDebugging(java.lang.String key) |
static void |
activateValidPackDebugging() |
static void |
activateValidPackDebugging(java.lang.String key) |
static void |
addLocaleChangeListener(L10nLocaleChangeListenerI _lcl) |
static void |
addPathCompilerForClass(java.lang.Class clazz,
L10nPathCompilerI compiler)
Registers an L10nPathCompilerI instance for a specific class.
|
static void |
addPreloadL10nCacheFinishedListener(PreloadL10nCacheFinishedListenerI l) |
static void |
appendPackProvider(L10nPackProviderI p) |
static electric.xml.Document |
applyL10n(electric.xml.Document _doc,
java.lang.Object[] _path) |
static electric.xml.Document |
applyL10n(electric.xml.Document _doc,
java.lang.Object[] _path,
java.lang.String _localeName) |
static void |
applyL10n(electric.xml.Element _el,
java.lang.Object[] _path) |
static void |
applyL10n(electric.xml.Element _el,
java.lang.Object[] _path,
java.lang.String _localeName) |
static java.lang.String |
applyL10n(java.lang.String in,
java.lang.Object[] path)
Replaces $R{...} in given String by appropriate texts and returns the result.
|
static java.lang.String |
applyL10n(java.lang.String in,
java.lang.Object[] path,
java.lang.String localeName) |
static java.lang.String |
applyL10nLocale(java.lang.String in,
java.lang.Object[] path,
java.util.Locale locale) |
static java.lang.String |
canonifyPackageName(java.lang.String s)
Removes inner class parts (indicated by '$') from a package name.
|
static java.lang.String[] |
compilePath(java.lang.Object[] participants)
Compiles and returns a list of L10nBundle names derived from the provided participant objects.
|
static void |
deactivateCompilePathDebugging() |
static void |
deactivateMsgDebugging() |
static void |
deactivateValidPackDebugging() |
static void |
firePathCompilersChanged() |
static void |
flushCache() |
static void |
flushCache(java.lang.String bundle) |
static void |
flushCache(java.lang.String[] bundles) |
static java.lang.String |
formatDate(java.util.Date d)
usage with locale not recommended as they are not being cached, which leads to poor performance. the locale can instead be stored in the pattern-string
|
static java.lang.String |
formatDate(java.util.Date d,
java.lang.String pattern) |
static java.lang.String |
formatDate(java.util.Date d,
java.lang.String pattern,
java.util.Locale _locale) |
static java.lang.String |
formatDate(java.util.Date d,
java.lang.String pattern,
java.util.Locale _locale,
java.util.TimeZone timeZone) |
static java.lang.String |
formatDateNT(java.util.Date d)
null safe version of formatDate with fallback if date is null
|
static java.lang.String |
formatDateNT(java.util.Date d,
java.lang.String pattern) |
static java.lang.String |
formatDateNT(java.util.Date d,
java.lang.String pattern,
java.util.Locale locale) |
static java.lang.String |
formatDateNT(java.util.Date d,
java.lang.String pattern,
java.util.Locale locale,
java.lang.String fallback) |
static java.lang.String |
formatDateNT(java.util.Date d,
java.lang.String pattern,
java.lang.String fallback)
null safe version of formatDate with fallback if date is null
|
static java.lang.String |
formatDecimal(java.lang.Number n) |
static java.lang.String |
formatDecimal(java.lang.Number n,
java.lang.String pattern) |
static java.lang.String |
formatDecimal(java.lang.Number n,
java.lang.String pattern,
java.util.Locale _locale) |
static java.lang.String |
formatDecimalNT(java.lang.Number n)
null safe version of formatDecimal with fallback if number is null
|
static java.lang.String |
formatDecimalNT(java.lang.Number n,
java.lang.String pattern) |
static java.lang.String |
formatDecimalNT(java.lang.Number n,
java.lang.String pattern,
java.util.Locale locale) |
static java.lang.String |
formatDecimalNT(java.lang.Number n,
java.lang.String pattern,
java.util.Locale locale,
java.lang.String fallback) |
static java.lang.String |
formatDecimalNT(java.lang.Number n,
java.lang.String pattern,
java.lang.String fallback)
null safe version of formatDecimal with fallback if number is null
|
static java.lang.String |
formatDuration(javax.xml.datatype.Duration _dur) |
static java.lang.String |
formatDuration(javax.xml.datatype.Duration _dur,
java.lang.String _pattern) |
static java.lang.String |
formatDuration(javax.xml.datatype.Duration _dur,
java.lang.String _pattern,
java.util.Locale _locale) |
static java.lang.String |
formatISO8601(java.util.Date date)
Returns the given Date in an ISO8601:2019 conformant String.
|
static java.lang.String |
formatISO8601(java.util.Date date,
boolean withLocalTimeZone) |
static java.lang.String |
formatISO8601NT(java.util.Date date)
Not throwing version of
#formatISO8601Date(Date, boolean) . |
static java.lang.String |
formatISO8601NT(java.util.Date date,
java.lang.String fallback) |
static java.lang.String |
formatISO8601NT(java.util.Date date,
java.lang.String fallback,
boolean withLocalTimeZone) |
static java.lang.String |
formatISODate(java.util.Date d)
Formats the given Date in ISO8601 like format, with the 'T' replaced by a space.
|
static java.lang.String |
formatISODateNT(java.util.Date d)
null safe version of formatISODate with fallback if date is null
|
static java.lang.String |
formatISODateNT(java.util.Date d,
java.lang.String fallback) |
static java.lang.String |
formatTimespan(java.lang.Number _ts) |
static java.lang.String |
formatTimespan(java.lang.Number _ts,
java.lang.String _pattern) |
static java.lang.String |
formatTimespan(java.lang.Number _ts,
java.lang.String _pattern,
java.util.Locale _locale) |
static java.lang.String[] |
getAutoPath()
Returns path compiled by using info from current StackTrace.
|
static java.lang.String[] |
getAutoPath(int _stackOffset) |
static java.text.Collator |
getCollator()
returns a Collator for the current default locale, but makes it space sensitive
|
static java.text.Collator |
getCollator(java.util.Locale l) |
static java.text.Collator |
getCollator(java.util.Locale l,
java.lang.String parms) |
static L10nCurrentLocaleProviderI |
getCurrentLocaleProvider()
Gets the locale provider for the current Thread.
|
static java.util.Locale |
getCurrentLocaleViaProvider()
Returns the current locale for the current Thread.
|
static L10nDateFormat |
getDateFormat() |
static L10nDateFormat |
getDateFormat(java.lang.String _pattern) |
static L10nDateFormat |
getDateFormat(java.lang.String _pattern,
java.util.Locale _locale) |
static L10nDateFormat |
getDateFormat(java.lang.String _pattern,
java.util.Locale _locale,
java.util.TimeZone timeZone) |
static L10nDecimalFormat |
getDecimalFormat()
Factory method to obtain locale-sensitive
DecimalFormat objects. |
static L10nDecimalFormat |
getDecimalFormat(java.lang.String _pattern) |
static L10nDecimalFormat |
getDecimalFormat(java.lang.String _pattern,
java.util.Locale _locale) |
static java.util.Locale |
getDefaultLocale() |
static java.lang.String |
getDefaultLocaleName() |
static java.util.function.Supplier<java.lang.String> |
getGetCallingClassNameImplementation() |
L10nPack |
getL10nPack(java.lang.String name,
java.lang.String localeName)
Retrieves a specific
L10nPack by its bundle name and locale. |
L10nPack[] |
getL10nPacks(java.lang.String[] bundles,
java.lang.String localeName)
Retrieves an array of
L10nPack objects for multiple specified bundle names and a single locale. |
L10nPathEntry[] |
getL10nPath()
Retrieves the localization path entries provided by this pack provider.
|
java.lang.String |
getL10nViaString()
Provides a descriptive string indicating the means by which localization (L10n) data was delivered.
|
static java.lang.String |
getLanguageSeperatedByDash(java.lang.String _str,
int _lang)
this method takes a String where the languages are seperated by |
it returns the _lang'th language of this string, beginning at 1
|
static java.util.Locale |
getLocaleFromString(java.lang.String s) |
static java.lang.String |
getMsgDebuggingActiveForKey() |
static L10nPack |
getPack(java.lang.String[] path,
int index)
Retrieves a localization pack (L10nPack) based on the provided path, index, and locale.
|
static L10nPack |
getPack(java.lang.String[] path,
int index,
java.lang.String localeName) |
static L10nTimespanFormat |
getTimespanFormat() |
static L10nTimespanFormat |
getTimespanFormat(java.lang.String pattern) |
static L10nTimespanFormat |
getTimespanFormat(java.lang.String pattern,
java.util.Locale locale) |
static java.lang.String |
getValidPackDebuggingActiveForKey() |
static java.lang.String |
getWaehrungsSymbol(java.lang.String isocode) |
L10nPack |
internalGetL10nPack(java.lang.String name,
java.lang.String localeName)
Loads L10nPack from *.properties file resources via classpath and
getResourceAsStream().
|
static boolean |
isCompilePathDebuggingActive() |
static boolean |
isMsgDebuggingActive() |
boolean |
isOperational()
Checks if this L10n pack provider is currently operational and ready to serve requests.
|
static boolean |
isParentOf(java.util.Locale supposedParent,
java.util.Locale supposedChild) |
static boolean |
isValidPackDebuggingActive() |
static void |
logCompiledPath(java.lang.Object[] participants,
java.util.LinkedHashSet<java.lang.String> compiledPath) |
static void |
logMsg(java.lang.String msg,
java.lang.String msgTemplate,
java.lang.String key,
java.lang.Object[] args,
java.lang.String[] path,
boolean returnKeyWhenNotFound,
java.lang.String localeName,
boolean useFallbackLocale) |
static void |
logValidPack(L10nPack pack,
java.lang.String key,
java.lang.String[] path,
java.lang.String localeName) |
static java.lang.String |
msg(java.lang.String key)
Convenience frontend that automatically compiles the path by getting the
calling class from the current StackTrace.
|
static java.lang.String |
msg(java.lang.String key,
byte arg0)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
int arg0)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
long arg0)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
java.lang.Number arg0)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
int stackOffset) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.Object[] _participants) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.Object[] _participants,
boolean returnKeyWhenNotFound) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.Object[] _participants,
boolean returnKeyWhenNotFound,
java.util.Locale locale) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.Object[] _participants,
boolean returnKeyWhenNotFound,
java.lang.String localeName) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.String[] path)
Retrieves a localized and formatted message based on a given key, arguments, and lookup path,
with various fallback options.
|
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.String[] path,
boolean returnKeyWhenNotFound) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.String[] path,
boolean returnKeyWhenNotFound,
java.lang.String localeName) |
static java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args,
java.lang.String[] path,
boolean returnKeyWhenNotFound,
java.lang.String localeName,
boolean useFallbackLocale) |
static java.lang.String |
msg(java.lang.String key,
short arg0)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
java.lang.String arg0)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msg(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
Convenience frontend for
#msg(String, Object[]) . |
static java.lang.String |
msgNoFormat(java.lang.String key)
Convenience frontend that automatically compiles the path by getting the
calling class from the current StackTrace.
|
static java.lang.String |
msgNoFormat(java.lang.String key,
int stackOffset) |
static java.lang.String |
msgNoFormat(java.lang.String key,
java.lang.String[] path)
Gets the matching message template string for key, etc.
|
static java.lang.String |
msgNoFormat(java.lang.String key,
java.lang.String[] path,
java.lang.String localeName) |
static java.lang.String |
msgNoKey(java.lang.String key)
Convenience frontend that automatically compiles the path by getting the
calling class from the current StackTrace.
|
static java.lang.String |
msgNoKey(java.lang.String key,
java.lang.Object[] args) |
static java.lang.String |
msgNoKey(java.lang.String key,
java.lang.Object[] args,
int stackOffset) |
static java.util.Date |
parseDate(java.lang.String s)
usage with locale not recommended as they are not being cached, which leads to poor performance. the locale can instead be stored in the pattern-string
|
static java.util.Date |
parseDate(java.lang.String s,
java.lang.String pattern) |
static java.util.Date |
parseDate(java.lang.String s,
java.lang.String[] patterns)
usage with locale not recommended as they are not being cached which leads to poor performance. the locale can instead be stored in the pattern-string
|
static java.util.Date |
parseDate(java.lang.String s,
java.lang.String[] patterns,
java.util.Locale _locale) |
static java.util.Date |
parseDate(java.lang.String s,
java.lang.String[] patterns,
java.util.Locale _locale,
java.util.TimeZone timeZone) |
static java.util.Date |
parseDate(java.lang.String s,
java.lang.String pattern,
java.util.Locale _locale) |
static java.util.Date |
parseDate(java.lang.String s,
java.lang.String pattern,
java.util.Locale _locale,
java.util.TimeZone timeZone) |
static java.util.Date |
parseDateNT(java.lang.String s)
wrapper for parseDate that throws no exception. if an exception is caught, fallback is returned, which defaults to null
|
static java.util.Date |
parseDateNT(java.lang.String s,
java.lang.String pattern) |
static java.util.Date |
parseDateNT(java.lang.String s,
java.lang.String[] patterns)
wrapper for parseDate that throws no exception. if an exception is caught, fallback is returned, which defaults to null
|
static java.util.Date |
parseDateNT(java.lang.String s,
java.lang.String[] patterns,
java.util.Date fallback) |
static java.util.Date |
parseDateNT(java.lang.String s,
java.lang.String pattern,
java.util.Date fallback) |
static java.math.BigDecimal |
parseDecimal(java.lang.String s)
Method to parse a L10n formatted Number in a String to the represented BigDecimal value.
|
static java.math.BigDecimal |
parseDecimal(java.lang.String s,
java.lang.String pattern) |
static java.math.BigDecimal |
parseDecimal(java.lang.String s,
java.lang.String[] patterns) |
static java.math.BigDecimal |
parseDecimal(java.lang.String s,
java.lang.String[] patterns,
java.util.Locale _locale) |
static java.math.BigDecimal |
parseDecimal(java.lang.String s,
java.lang.String pattern,
java.util.Locale _locale) |
static java.math.BigDecimal |
parseDecimalNT(java.lang.String s)
wrapper for parseDecimal that throws no exception. if an exception is caught, fallback is returned, which defaults to null
|
static java.math.BigDecimal |
parseDecimalNT(java.lang.String s,
java.lang.String pattern) |
static java.math.BigDecimal |
parseDecimalNT(java.lang.String s,
java.lang.String[] patterns)
wrapper for parseDecimal that throws no exception. if an exception is caught, fallback is returned, which defaults to null
|
static java.math.BigDecimal |
parseDecimalNT(java.lang.String s,
java.lang.String[] patterns,
java.math.BigDecimal fallback) |
static java.math.BigDecimal |
parseDecimalNT(java.lang.String s,
java.lang.String pattern,
java.math.BigDecimal fallback) |
static javax.xml.datatype.Duration |
parseDuration(java.lang.String s) |
static java.util.Date |
parseISO8601(java.lang.String s)
Parses an ISO8601:2019 conform Datetime text, returning the parameter as Date.
|
static java.util.Date |
parseISO8601NT(java.lang.String s)
Non-throw version of
parseISO8601(String) , returning the fallback if the given String is not a valid ISO date |
static java.util.Date |
parseISO8601NT(java.lang.String s,
java.util.Date fallback) |
static java.util.Date |
parseISODate(java.lang.String s)
Parses the given parameter as a ISO8601 like date, e.g. yyyy-MM-dd'T'HH:mm:ss.SSSX or yyyy-MM-dd,
while trying to be a bit more tolerant regarding formatting errors.
|
static java.util.Date |
parseISODateNT(java.lang.String s)
wrapper for parseISODate thet throws no exception. if an exception is caught, fallback is returned, which defaults to null
|
static java.util.Date |
parseISODateNT(java.lang.String s,
java.util.Date fallback) |
static java.lang.Long |
parseTimespan(java.lang.String _str) |
static java.lang.Long |
parseTimespan(java.lang.String _str,
java.lang.String _pattern) |
static java.lang.Long |
parseTimespan(java.lang.String _str,
java.lang.String[] _patterns) |
static java.lang.Long |
parseTimespan(java.lang.String _str,
java.lang.String[] _patterns,
java.util.Locale _locale) |
static java.lang.Long |
parseTimespan(java.lang.String _str,
java.lang.String _pattern,
java.util.Locale _locale) |
static void |
preloadCache(L10nPackProviderI providerForPreloading,
L10nPack[] packsToPreload,
java.lang.String localeName) |
static void |
prependPackProvider(L10nPackProviderI p) |
static void |
recalcPath()
Recalculates and updates the global lookup path for localization resources.
|
static void |
releaseDateFormat(L10nDateFormat df) |
static void |
releaseDecimalFormat(L10nDecimalFormat df)
Releases a
L10nDecimalFormat instance back to the cache for potential reuse. |
static void |
releaseTimespanFormat(L10nTimespanFormat df) |
static void |
removePackProvider(L10nPackProviderI p) |
static void |
removePathCompilerForClass(java.lang.Class clazz,
L10nPathCompilerI compiler)
FIXME: (Currently) Not used.
|
static L10n.UnresolvedMessage |
resolveLater(java.lang.String msg,
java.lang.Object participant) |
static L10n.UnresolvedMessage |
resolveLater(java.lang.String msg,
java.lang.Object[] participants) |
static L10n.UnresolvedMessage |
resolveLater(java.lang.String msg,
java.lang.Object[] parameters,
java.lang.Object[] participants) |
static void |
setCurrentLocaleProvider(L10nCurrentLocaleProviderI p)
Sets the locale provider for the current Thread.
|
static void |
setDefaultLocale(java.util.Locale l)
Sets the static default locale value for the
L10n class as well as the default locale of the JVM. |
static void |
setDefaultLocaleName(java.lang.String s) |
static L10nCurrentLocaleProviderI |
setLocaleForCurrentThread(java.util.Locale locale)
Convenience frontend for
setCurrentLocaleProvider() which automatically wraps the given locale into
a new SimpleL10nLocaleProvider and sets that. |
static L10nCurrentLocaleProviderI |
setLocaleNameForCurrentThread(java.lang.String localeName) |
static java.lang.String[] |
splitPath(java.lang.String _path)
Splits the given _path on '/' but ignoring '/' insided of $R{...} tags.
|
static java.lang.String |
stringToKey(java.lang.String _str)
Creates a usable L10n message key from a given String.
|
static java.lang.String |
stringToKey(java.lang.String _str,
java.lang.String _prefix) |
static L10nPack |
validPack(java.lang.String key,
java.lang.String[] path)
A valid L10nPack is where pack.getString(key) <> null
|
static L10nPack |
validPack(java.lang.String key,
java.lang.String[] path,
java.lang.String localeName) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prefetchL10nPacks
public static final java.util.regex.Pattern validPackagePattern
This pattern allows for uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), underscores (_), hyphens (-), and dots (.).
public static final java.util.regex.Pattern validBundleNamePattern
This pattern allows for uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), hyphens (-), and dots (.).
public static final java.lang.String validResourceKeyChars
This string literal specifies that L10n resource keys can contain:
validResourceKeyPattern
regex.public static final java.util.regex.Pattern validResourceKeyPattern
This pattern is constructed using the characters defined in the
validResourceKeyChars
constant, ensuring that all characters allowed in
a resource key match this pattern. Resource keys are used to uniquely
identify localization resources within bundles.
public static final java.util.regex.Pattern l10nTagPattern
public static final java.lang.String PACK_SEPARATOR
public static final java.lang.Object defaultLocaleLock
setDefaultLocale()
this will
influence all threads of course, as it is a global value.
If the default locale is changed on a temporary basis for some reasons this lock object should be
used to synchronize those changes between threads to avoid unexpected problems or behaviour.public static final void activateCompilePathDebugging()
public static final void deactivateCompilePathDebugging()
public static final boolean isCompilePathDebuggingActive()
public static final void logCompiledPath(java.lang.Object[] participants, java.util.LinkedHashSet<java.lang.String> compiledPath)
public static final void activateMsgDebugging()
public static final void activateMsgDebugging(java.lang.String key)
public static final void deactivateMsgDebugging()
public static final boolean isMsgDebuggingActive()
public static final java.lang.String getMsgDebuggingActiveForKey()
public static final void logMsg(java.lang.String msg, java.lang.String msgTemplate, java.lang.String key, java.lang.Object[] args, java.lang.String[] path, boolean returnKeyWhenNotFound, java.lang.String localeName, boolean useFallbackLocale)
public static final void activateValidPackDebugging()
public static final void activateValidPackDebugging(java.lang.String key)
public static final void deactivateValidPackDebugging()
public static final boolean isValidPackDebuggingActive()
public static final java.lang.String getValidPackDebuggingActiveForKey()
public static final void logValidPack(L10nPack pack, java.lang.String key, java.lang.String[] path, java.lang.String localeName)
public static final java.lang.String applyL10nLocale(java.lang.String in, java.lang.Object[] path, java.util.Locale locale)
#applyL10n(String, Object[], String), with the last parameter being the LanguageTag if locale is not null
public static final java.lang.String applyL10n(java.lang.String in, java.lang.Object[] path)
in
- input String containing $R{...} parts which shall be translated using L10nBundlespath
- an object array containing the names of the L10nBundles to use for looking up the keyslocaleName
- the name of the locale to use for resolving the translated String, e.g. de, en, fr or even de_DE, fr_LU, de_LU etc.public static final java.lang.String applyL10n(java.lang.String in, java.lang.Object[] path, java.lang.String localeName)
public static final electric.xml.Document applyL10n(electric.xml.Document _doc, java.lang.Object[] _path)
public static final electric.xml.Document applyL10n(electric.xml.Document _doc, java.lang.Object[] _path, java.lang.String _localeName)
public static final void applyL10n(electric.xml.Element _el, java.lang.Object[] _path)
public static final void applyL10n(electric.xml.Element _el, java.lang.Object[] _path, java.lang.String _localeName)
public static final java.lang.String msg(java.lang.String key, byte arg0)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and a single byte
argument.
It is intended for scenarios where only one byte
argument is needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the l10n message templatearg0
- the byte
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, short arg0)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and a single short
argument.
It is intended for scenarios where only one short
argument is needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the l10n message templatearg0
- the short
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, int arg0)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and a single int
argument.
It is intended for scenarios where only one int
argument is needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the l10n message templatearg0
- the int
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, long arg0)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and a single long
argument.
It is intended for scenarios where only one long
argument is needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the l10n message templatearg0
- the long
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, java.lang.Number arg0)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and a single Number
argument.
It is intended for scenarios where only one Number
argument is needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the proper l10n entryarg0
- the Number
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, java.lang.String arg0)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and a single String
argument.
It is intended for scenarios where only one String
argument is needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the proper l10n entryarg0
- the String
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, java.lang.String arg0, java.lang.String arg1)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and two String
arguments.
It is intended for scenarios where only two String
arguments are needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the proper l10n entryarg0
- the first String
argument to be substituted into the message templatearg1
- the second String
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and three String
arguments.
It is intended for scenarios where only three String
arguments are needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the proper l10n entryarg0
- the first String
argument to be substituted into the message templatearg1
- the second String
argument to be substituted into the message templatearg2
- the third String
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
#msg(String, Object[])
.
This method provides a simplified way to generate a message string using a key and four String
arguments.
It is intended for scenarios where only four String
arguments are needed, thereby avoiding the need to create an array manually.
*
key
- the l10n key used to identify the proper l10n entryarg0
- the first String
argument to be substituted into the message templatearg1
- the second String
argument to be substituted into the message templatearg2
- the third String
argument to be substituted into the message templatearg3
- the fourth String
argument to be substituted into the message templatepublic static final java.lang.String msg(java.lang.String key)
stackOffset
- not needed any more and ignored, but kept in for backwards compatibility.public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, int stackOffset)
public static final java.lang.String msgNoKey(java.lang.String key)
stackOffset
- not needed any more and ignored, but kept in for backwards compatibility.public static final java.lang.String msgNoKey(java.lang.String key, java.lang.Object[] args)
public static final java.lang.String msgNoKey(java.lang.String key, java.lang.Object[] args, int stackOffset)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.Object[] _participants, boolean returnKeyWhenNotFound, java.util.Locale locale)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.Object[] _participants)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.Object[] _participants, boolean returnKeyWhenNotFound)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.Object[] _participants, boolean returnKeyWhenNotFound, java.lang.String localeName)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.String[] path)
This method searches for the translation of the key
within the specified
path
of localization bundles for the designated localeName
.
It supports dynamic insertion of arguments into the message template using
MessageFormat.format(String, Object...)
.
key
- The String
key that needs to be translated using the L10n bundles.args
- An Object
array containing values to be inserted into the message template.
These values replace placeholders like {0}, {1}, etc., in the translated string.
Can be null
.path
- A String
array containing the names of the L10n bundles to use for
looking up the key. The bundles are searched in the order specified in this array.returnKeyWhenNotFound
- A boolean flag. If true
(default), and no matching bundle or key
is found in the system or along the provided path (and no fallback locale is used
or successful), the original key
string will be returned as a fallback.
If false
, null
will be returned in such cases.localeName
- The String
name of the locale to use for resolving the translated string
(e.g., "de", "en", "fr" or more specific like "de_DE", "fr_LU", "de_LU").
If null
, the default locale will be used.useFallbackLocale
- A boolean flag. If true
(default), and the key is not found in the
specified localeName
(i.e. in its associated bundle), the system will attempt
to retrieve the message from a pre-configured fallback locale.
If false
, no fallback to the hardcoded fallback locale will occur.String
for the key, resolved from the L10n bundles in the system
or in the path. The message template may also have been formatted with the provided arguments.
Returns the original key, or null
, depending on returnKeyWhenNotFound
if no translation
is found and no fallback is successful.public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.String[] path, boolean returnKeyWhenNotFound)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.String[] path, boolean returnKeyWhenNotFound, java.lang.String localeName)
public static final java.lang.String msg(java.lang.String key, java.lang.Object[] args, java.lang.String[] path, boolean returnKeyWhenNotFound, java.lang.String localeName, boolean useFallbackLocale)
public static final java.lang.String msgNoFormat(java.lang.String key)
stackOffset
- not needed any more and ignored, but kept in for backwards compatibility.public static final java.lang.String msgNoFormat(java.lang.String key, int stackOffset)
public static final java.lang.String msgNoFormat(java.lang.String key, java.lang.String[] path)
key
- the key (name) of the L10nResource to findpath
- the names of the L10nBundles in which the matching resource should be searchedlocaleName
- name of a locale (optional); if null the current one will be usedpublic static final java.lang.String msgNoFormat(java.lang.String key, java.lang.String[] path, java.lang.String localeName)
public static final L10n.UnresolvedMessage resolveLater(java.lang.String msg, java.lang.Object[] parameters, java.lang.Object[] participants)
public static final L10n.UnresolvedMessage resolveLater(java.lang.String msg, java.lang.Object[] participants)
public static final L10n.UnresolvedMessage resolveLater(java.lang.String msg, java.lang.Object participant)
public static final L10nPack validPack(java.lang.String key, java.lang.String[] path)
public static final L10nPack validPack(java.lang.String key, java.lang.String[] path, java.lang.String localeName)
public static final java.lang.String[] getAutoPath()
_stackOffset
- not needed any more and ignored, but kept in for backwards compatibility.public static final java.lang.String[] getAutoPath(int _stackOffset)
public static java.util.function.Supplier<java.lang.String> getGetCallingClassNameImplementation()
public static final java.lang.String stringToKey(java.lang.String _str)
This method transforms the input string into a format suitable for use as a localization key. It performs the following steps:
validResourceKeyChars
) with underscores (_).
_prefix
is provided, it prepends this prefix to the processed string.FIXME: It is currently believed that the L10n system itself might not strictly enforce this key format. However, some methods within external components (e.g. in the Solstice Client) appear to perform checks that require keys to conform to a specific structure. While the strict necessity of this formatting remains somewhat uncertain, using this method to create keys is safe and will not cause problems, ensuring compatibility with potential external validation.
_str
- The input String from which to create the L10n message key._prefix
- An optional String prefix to prepend to the generated key. If null, no prefix is added.public static final java.lang.String stringToKey(java.lang.String _str, java.lang.String _prefix)
public static final java.lang.String[] compilePath(java.lang.Object[] participants)
This method takes a raw collection of objects involved in the bundle lookup process, which can include Business Object Types (BOTs), Business Objects (BOs), entities, other generic objects, or even null values. It processes these participants recursively to generate a concrete list of L10nBundle names that should be searched for localization keys.
participants
- An array of Objects representing the participants in the bundle lookup.public static final java.lang.String canonifyPackageName(java.lang.String s)
s
- The package name string to canonize.public static final void addPathCompilerForClass(java.lang.Class clazz, L10nPathCompilerI compiler)
clazz
- The Class for which to register the compiler.compiler
- The L10nPathCompilerI instance to register.public static final void removePathCompilerForClass(java.lang.Class clazz, L10nPathCompilerI compiler)
clazz
- The class from which the L10nPathCompilerI should be removed.compiler
- The L10nPathCompilerI instance to deregister.public static final void firePathCompilersChanged()
public boolean isOperational()
L10nPackProviderI
isOperational
in interface L10nPackProviderI
true
if the provider is operational, false
otherwise.public static final L10nPack getPack(java.lang.String[] path, int index)
The process of loading localization packs is complex because it accounts for incomplete packs. An incomplete pack contains only a subset of keys, with the remaining keys being supplied by other L10n providers that have a lower priority in the lookup chain. Therefore, this method must query *all* available providers for their respective packs and then consolidate their entries using a "fill-in-missing" mechanism.
The algorithm employed (using path
and index
) is a specialized optimization
designed to minimize roundtrips to the underlying loading mechanism, particularly when
interacting with a server. Instead of fetching each pack individually, this approach requests
the path and an index. Upon the first lookup miss, the entire chain of potential resources
can be loaded proactively. This strategy is efficient because it acknowledges that subsequent
resource lookups within the same chain are likely to also result in misses, making a bulk load
more performant than individual requests.
path
- An array of String
s representing the lookup path elements for the L10nPack.index
- An integer indicating the starting index within the path to begin the lookup.
This is part of the optimization for minimizing roundtrips.localeName
- A String
representing the name of the locale for which the pack is being retrieved.
If null
, the default locale name retrieved via getDefaultLocaleName()
is used.L10nPack
containing localized entries, potentially aggregated
from multiple providers, or null
if no or only an empty entry exists in the passed path array
at the passed index.public static final L10nPack getPack(java.lang.String[] path, int index, java.lang.String localeName)
public static final void addPreloadL10nCacheFinishedListener(PreloadL10nCacheFinishedListenerI l)
public static final void preloadCache(L10nPackProviderI providerForPreloading, L10nPack[] packsToPreload, java.lang.String localeName)
public static final void recalcPath()
This method collects all path entries from every registered localization pack provider. These collected paths are then ordered according to a defined precedence: first, ascending by their position, then alphabetically by the path string itself. Duplicate entries are filtered out along the way. The resulting global path is crucial for efficiently locating localization resources across the application.
public static final void flushCache()
public static final void flushCache(java.lang.String[] bundles)
public static final void flushCache(java.lang.String bundle)
public java.lang.String getL10nViaString()
L10nPackProviderI
getL10nViaString
in interface L10nPackProviderI
public L10nPack[] getL10nPacks(java.lang.String[] bundles, java.lang.String localeName)
L10nPackProviderI
L10nPack
objects for multiple specified bundle names and a single locale.getL10nPacks
in interface L10nPackProviderI
bundles
- An array of String
names of the L10n bundles to retrieve.localeName
- The name of the Locale
for which to retrieve the packs.L10nPack
s corresponding to the requested bundle names,
or an empty array if none are found.public L10nPack getL10nPack(java.lang.String name, java.lang.String localeName)
L10nPackProviderI
L10nPack
by its bundle name and locale.getL10nPack
in interface L10nPackProviderI
name
- The name of the L10n bundle to retrieve.localeName
- The name of the Locale
for which to retrieve the pack.L10nPack
, or null
if not found.public L10nPathEntry[] getL10nPath()
L10nPackProviderI
These path entries define the locations or priorities for searching localization resources within the overall L10n system.
getL10nPath
in interface L10nPackProviderI
L10nPathEntry
objects.public L10nPack internalGetL10nPack(java.lang.String name, java.lang.String localeName)
public static final void prependPackProvider(L10nPackProviderI p)
public static final void appendPackProvider(L10nPackProviderI p)
public static final void removePackProvider(L10nPackProviderI p)
public static final void addLocaleChangeListener(L10nLocaleChangeListenerI _lcl)
public static final void setDefaultLocale(java.util.Locale l)
L10n
class as well as the default locale of the JVM.
Warning: This will change the settings for the whole JVM and all threads; consider using
setCurrentLocaleProvider()
instead which will change the setting - for the L10n
class only
though - only for the calling thread.public static final void setCurrentLocaleProvider(L10nCurrentLocaleProviderI p)
public static final L10nCurrentLocaleProviderI getCurrentLocaleProvider()
public static final L10nCurrentLocaleProviderI setLocaleForCurrentThread(java.util.Locale locale)
setCurrentLocaleProvider()
which automatically wraps the given locale
into
a new SimpleL10nLocaleProvider
and sets that.
As with setCurrentLocaleProvider()
remember to re-set the previous locale provider (possibly null in most
cases) after the locale change is no longer required.locale
- the desired default locale for the current threadL10nCurrentLocaleProviderI
(or null, if none is set)public static final L10nCurrentLocaleProviderI setLocaleNameForCurrentThread(java.lang.String localeName)
public static final java.util.Locale getCurrentLocaleViaProvider()
public static final java.util.Locale getDefaultLocale()
public static final void setDefaultLocaleName(java.lang.String s)
public static final java.lang.String getDefaultLocaleName()
public static final boolean isParentOf(java.util.Locale supposedParent, java.util.Locale supposedChild)
public static final java.util.Locale getLocaleFromString(java.lang.String s)
public static final L10nDecimalFormat getDecimalFormat()
DecimalFormat
objects.
This method provides a flexible way to get a properly configured DecimalFormat
instance. It supports custom patterns and locale settings, and includes caching for
frequently requested formats based on the current default locale.
_pattern
- The String
pattern to use for formatting numbers (as specified in
DecimalFormat
JDK API documentation).
If null
, a standard pattern is constructed that matches locale settings
but mimics a no-grouping, no-decimal-separator style on EN_US platforms._locale
- The designated Locale
for this pattern.
If null
, the system's default locale is used.
Note that if an explicit Locale
is provided that differs from the current
system default, caching for the generated DecimalFormat
object will not
be applied, leading to a new object creation on each call for such specific locales.L10nDecimalFormat
object matching the specified pattern and locale.public static final L10nDecimalFormat getDecimalFormat(java.lang.String _pattern)
public static final L10nDecimalFormat getDecimalFormat(java.lang.String _pattern, java.util.Locale _locale)
public static final void releaseDecimalFormat(L10nDecimalFormat df)
L10nDecimalFormat
instance back to the cache for potential reuse.
This method allows for the efficient management of L10nDecimalFormat
objects
by returning them to a pool or cache. The object is stored in the cache using its pattern
as the key, and a condition (derived from L10nDecimalFormat::canBeCached
and the locale)
determines if it's eligible for caching.
df
- The L10nDecimalFormat
instance to release.public static final java.lang.String formatDecimal(java.lang.Number n)
public static final java.lang.String formatDecimal(java.lang.Number n, java.lang.String pattern)
public static final java.lang.String formatDecimal(java.lang.Number n, java.lang.String pattern, java.util.Locale _locale)
public static final java.lang.String formatDecimalNT(java.lang.Number n, java.lang.String pattern, java.lang.String fallback)
public static final java.lang.String formatDecimalNT(java.lang.Number n)
public static final java.lang.String formatDecimalNT(java.lang.Number n, java.lang.String pattern)
public static final java.lang.String formatDecimalNT(java.lang.Number n, java.lang.String pattern, java.util.Locale locale)
public static final java.lang.String formatDecimalNT(java.lang.Number n, java.lang.String pattern, java.util.Locale locale, java.lang.String fallback)
public static final java.math.BigDecimal parseDecimal(java.lang.String s) throws java.text.ParseException
s
- the input string to parsepattern
- FIXME link to pattern description_local
- the locale of the source string, e.g. GERMAN for 12,3 or US for 12.3java.text.ParseException
public static final java.math.BigDecimal parseDecimal(java.lang.String s, java.lang.String pattern) throws java.text.ParseException
java.text.ParseException
public static final java.math.BigDecimal parseDecimal(java.lang.String s, java.lang.String pattern, java.util.Locale _locale) throws java.text.ParseException
java.text.ParseException
public static final java.math.BigDecimal parseDecimal(java.lang.String s, java.lang.String[] patterns) throws MultipleParseException
MultipleParseException
public static final java.math.BigDecimal parseDecimal(java.lang.String s, java.lang.String[] patterns, java.util.Locale _locale) throws MultipleParseException
MultipleParseException
public static final java.math.BigDecimal parseDecimalNT(java.lang.String s)
public static final java.math.BigDecimal parseDecimalNT(java.lang.String s, java.lang.String pattern)
public static final java.math.BigDecimal parseDecimalNT(java.lang.String s, java.lang.String pattern, java.math.BigDecimal fallback)
public static final java.math.BigDecimal parseDecimalNT(java.lang.String s, java.lang.String[] patterns)
public static final java.math.BigDecimal parseDecimalNT(java.lang.String s, java.lang.String[] patterns, java.math.BigDecimal fallback)
public static final L10nDateFormat getDateFormat()
public static final L10nDateFormat getDateFormat(java.lang.String _pattern)
public static final L10nDateFormat getDateFormat(java.lang.String _pattern, java.util.Locale _locale)
public static final L10nDateFormat getDateFormat(java.lang.String _pattern, java.util.Locale _locale, java.util.TimeZone timeZone)
public static final void releaseDateFormat(L10nDateFormat df)
public static final java.lang.String formatDate(java.util.Date d)
public static final java.lang.String formatDate(java.util.Date d, java.lang.String pattern)
public static final java.lang.String formatDate(java.util.Date d, java.lang.String pattern, java.util.Locale _locale)
public static final java.lang.String formatDate(java.util.Date d, java.lang.String pattern, java.util.Locale _locale, java.util.TimeZone timeZone)
public static final java.lang.String formatDateNT(java.util.Date d, java.lang.String pattern, java.lang.String fallback)
public static final java.lang.String formatDateNT(java.util.Date d)
public static final java.lang.String formatDateNT(java.util.Date d, java.lang.String pattern)
public static final java.lang.String formatDateNT(java.util.Date d, java.lang.String pattern, java.util.Locale locale)
public static final java.lang.String formatDateNT(java.util.Date d, java.lang.String pattern, java.util.Locale locale, java.lang.String fallback)
public static final java.util.Date parseDate(java.lang.String s) throws java.text.ParseException
java.text.ParseException
public static final java.util.Date parseDate(java.lang.String s, java.lang.String pattern) throws java.text.ParseException
java.text.ParseException
public static final java.util.Date parseDate(java.lang.String s, java.lang.String pattern, java.util.Locale _locale) throws java.text.ParseException
java.text.ParseException
public static final java.util.Date parseDate(java.lang.String s, java.lang.String pattern, java.util.Locale _locale, java.util.TimeZone timeZone) throws java.text.ParseException
java.text.ParseException
public static final java.util.Date parseDateNT(java.lang.String s)
public static final java.util.Date parseDateNT(java.lang.String s, java.lang.String pattern)
public static final java.util.Date parseDateNT(java.lang.String s, java.lang.String pattern, java.util.Date fallback)
public static final java.util.Date parseDateNT(java.lang.String s, java.lang.String[] patterns)
public static final java.util.Date parseDateNT(java.lang.String s, java.lang.String[] patterns, java.util.Date fallback)
public static final java.util.Date parseDate(java.lang.String s, java.lang.String[] patterns) throws MultipleParseException
MultipleParseException
public static final java.util.Date parseDate(java.lang.String s, java.lang.String[] patterns, java.util.Locale _locale) throws MultipleParseException
MultipleParseException
public static final java.util.Date parseDate(java.lang.String s, java.lang.String[] patterns, java.util.Locale _locale, java.util.TimeZone timeZone) throws MultipleParseException
MultipleParseException
public static final java.util.Date parseISO8601(java.lang.String s) throws java.time.format.DateTimeParseException
java.time.OffsetDateTime#parse(String)
.
Expected formats are yyyy-MM-dd'T'HH:mm:ss.SSSX or yyyy-MM-dd'T'HH:mm:ssX
The resolution of the result will be limited by the maximum resolution possible of Date, i.e. milliseconds.
Nanosecond information of the input will be ignored.s
- an ISO conformant String, not null.java.time.format.DateTimeParseException
public static final java.util.Date parseISO8601NT(java.lang.String s)
parseISO8601(String)
, returning the fallback if the given String is not a valid ISO datepublic static final java.util.Date parseISO8601NT(java.lang.String s, java.util.Date fallback)
public static final java.util.Date parseISODate(java.lang.String s) throws MultipleParseException
s
- the date(time) to parse, nonnull.MultipleParseException
public static final java.util.Date parseISODateNT(java.lang.String s)
public static final java.util.Date parseISODateNT(java.lang.String s, java.util.Date fallback)
public static final java.lang.String formatISODate(java.util.Date d)
public static final java.lang.String formatISODateNT(java.util.Date d)
public static final java.lang.String formatISODateNT(java.util.Date d, java.lang.String fallback)
public static final java.lang.String formatISO8601(java.util.Date date)
parseISO8601(String)
.
e.g. 2021-02-25T14:15:00.001Z or 2021-02-25T15:15:00.001+01:00date
- the date to format, not null.withLocalTimeZone
- defaults to false, which will return the date in Zulu time, aka GMT+0.
If true, the current default timezone is used to format the date.
The represented point in time will be identical in either case.OffsetDateTime.ofInstant(Instant, ZoneId)
public static final java.lang.String formatISO8601(java.util.Date date, boolean withLocalTimeZone)
public static final java.lang.String formatISO8601NT(java.util.Date date)
#formatISO8601Date(Date, boolean)
. Defaults to the empty String on error.public static final java.lang.String formatISO8601NT(java.util.Date date, java.lang.String fallback)
public static final java.lang.String formatISO8601NT(java.util.Date date, java.lang.String fallback, boolean withLocalTimeZone)
public static final L10nTimespanFormat getTimespanFormat()
public static final L10nTimespanFormat getTimespanFormat(java.lang.String pattern)
public static final L10nTimespanFormat getTimespanFormat(java.lang.String pattern, java.util.Locale locale)
public static final void releaseTimespanFormat(L10nTimespanFormat df)
public static final java.lang.String formatTimespan(java.lang.Number _ts)
_ts
- timespan in millisecondspublic static final java.lang.String formatTimespan(java.lang.Number _ts, java.lang.String _pattern)
public static final java.lang.String formatTimespan(java.lang.Number _ts, java.lang.String _pattern, java.util.Locale _locale)
public static final java.lang.Long parseTimespan(java.lang.String _str) throws java.text.ParseException
java.text.ParseException
public static final java.lang.Long parseTimespan(java.lang.String _str, java.lang.String _pattern) throws java.text.ParseException
java.text.ParseException
public static final java.lang.Long parseTimespan(java.lang.String _str, java.lang.String _pattern, java.util.Locale _locale) throws java.text.ParseException
java.text.ParseException
public static final java.lang.Long parseTimespan(java.lang.String _str, java.lang.String[] _patterns) throws MultipleParseException
MultipleParseException
public static final java.lang.Long parseTimespan(java.lang.String _str, java.lang.String[] _patterns, java.util.Locale _locale) throws MultipleParseException
MultipleParseException
public static final java.lang.String formatDuration(javax.xml.datatype.Duration _dur)
public static final java.lang.String formatDuration(javax.xml.datatype.Duration _dur, java.lang.String _pattern)
public static final java.lang.String formatDuration(javax.xml.datatype.Duration _dur, java.lang.String _pattern, java.util.Locale _locale)
public static final javax.xml.datatype.Duration parseDuration(java.lang.String s)
public static final java.lang.String getWaehrungsSymbol(java.lang.String isocode)
public static final java.text.Collator getCollator()
public static final java.text.Collator getCollator(java.util.Locale l)
public static final java.text.Collator getCollator(java.util.Locale l, java.lang.String parms)
public static final java.lang.String[] splitPath(java.lang.String _path)
public static final java.lang.String getLanguageSeperatedByDash(java.lang.String _str, int _lang)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.