|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.i18n.LocalizedJavaString
public final class LocalizedJavaString
Class LocalizedJavaString provides a way to strings in Java classes that should be localized.
| Nested Class Summary | |
|---|---|
static interface |
LocalizedJavaString.Localizer
A Localizer knows how to return a localized string given the key and class name. |
static interface |
LocalizedJavaString.LocalizerWithSourceOfTruthLocale
A Localizer knows how to return a localized string given the key and class name. |
| Constructor Summary | |
|---|---|
LocalizedJavaString(String className,
int key,
String originalString)
|
|
LocalizedJavaString(String className,
String keyString,
String originalString)
|
|
| Method Summary | |
|---|---|
String |
getClassName()
Returns the classname associated with the original string |
String |
getKey()
Returns the key associated with the original string |
String |
getLocalizedString(Locale locale)
|
static String |
getLocalizedString(String className,
int key,
String originalString,
Locale locale)
Static method to return an aribaweb-style localized package string for the given arguments, without needless allocations. |
static String |
getLocalizedString(String className,
String keyString,
String originalString,
Locale locale)
Static method to return an aribaweb-style localized package string for the given arguments, without needless allocations. |
String |
getOriginalString()
Returns the original string |
Locale |
getSourceOfTruthLocale()
|
String |
getString(Locale locale)
Implementations of the single parameter getString should always just call getString with a second parameter of true, for useDefaulting. |
String |
getString(Locale locale,
boolean useDefaulting)
|
static void |
registerLocalizer(LocalizedJavaString.Localizer localizer)
Register an instance of Localizer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalizedJavaString(String className,
int key,
String originalString)
className - name of the class in which the string is createdkey - integer key unique within the classoriginalString - string in en_US
public LocalizedJavaString(String className,
String keyString,
String originalString)
className - name of the class in which the string is createdkeyString - String key unique within the classoriginalString - string in en_US| Method Detail |
|---|
public String getLocalizedString(Locale locale)
locale - locale
public String getOriginalString()
public String getKey()
public String getClassName()
public String getString(Locale locale)
getString in interface LocalizedStringInterface
public String getString(Locale locale,
boolean useDefaulting)
getString in interface LocalizedStringInterfacepublic Locale getSourceOfTruthLocale()
getSourceOfTruthLocale in interface LocalizedStringInterfacepublic static void registerLocalizer(LocalizedJavaString.Localizer localizer)
localizer - the localize to register.
public static String getLocalizedString(String className,
int key,
String originalString,
Locale locale)
className - String full class path, with package name followed by dot and bare
class name.key - int secondary key within the class.originalString - String value that appears as a literal in the source code call
to localizedJavaStringHere, or equivalent.locale - Locale for the string
public static String getLocalizedString(String className,
String keyString,
String originalString,
Locale locale)
className - String full class path, with package name followed by dot and bare
class name.keyString - String secondary key within the class.originalString - String value that appears as a literal in the source code call
to localizedJavaStringHere, or equivalent.locale - Locale for the string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||