public class I18nItemAny extends I18nItem
A class that implements multi-locale resource in
MessageFormat style with arbitrary number of
arguments, to be used together with I18nHandler subclasses.
Allowing an arbitrary number of arguments has a disadvantage that
compile-time argument type consistency is not available. With this in mind
fixed-arguments-number classes I18nItem1, I18nItem2 and
I18nItem3 may be preferable whenever possible.
See package info for a usage example.
| Constructor and Description |
|---|
I18nItemAny(LocalizedMessage... data)
The public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
s(Object... args)
The method to obtain a formatted message in a locale that is best
preferred for the current user.
|
getBestLanguage, getBestLocaleAndMessage, getBestLocaleTag, obtainMessageFormatpublic I18nItemAny(LocalizedMessage... data)
data - a varargs array of translations for a message to various
locales