|
juife v0.1a |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.juife.I18n
public class I18n
This class provides methods for managing the locale-specific data of a particular UI application or library.
Constructor Summary | |
---|---|
I18n()
Creates a new instance of I18n . |
Method Summary | |
---|---|
java.lang.String |
getButtonLabel(java.lang.String key)
Gets a button label for the given key. |
java.lang.String |
getButtonLabel(java.lang.String pattern,
java.lang.Object... arguments)
Formats a button label using the specified pattern and arguments. |
java.util.Locale |
getCurrentLocale()
Gets the current locale. |
java.lang.String |
getError(java.lang.String key)
Gets an error message for the given key. |
java.lang.String |
getError(java.lang.String pattern,
java.lang.Object... arguments)
Formats an error message using the specified pattern and arguments. |
java.lang.String |
getLabel(java.lang.String key)
Gets a label for the given key. |
java.lang.String |
getLabel(java.lang.String pattern,
java.lang.Object... arguments)
Formats a label using the specified pattern and arguments. |
java.lang.String |
getLogMessage(java.lang.String key)
Gets a log message for the given key. |
java.lang.String |
getLogMessage(java.lang.String pattern,
java.lang.Object... arguments)
Formats a log message using the specified pattern and arguments. |
java.lang.String |
getMenuLabel(java.lang.String key)
Gets a menu label for the given key. |
java.lang.String |
getMenuLabel(java.lang.String pattern,
java.lang.Object... arguments)
Formats a menu label using the specified pattern and arguments. |
java.lang.String |
getMessage(java.lang.String key)
Gets a message for the given key. |
java.lang.String |
getMessage(java.lang.String pattern,
java.lang.Object... arguments)
Formats a message using the specified pattern and arguments. |
void |
setButtonsBundle(java.lang.String baseName)
Sets the resource bundle that will provide the button labels. |
void |
setCurrentLocale(java.lang.String language,
java.lang.String country)
Sets the current locale using the specified language and country. |
void |
setErrorsBundle(java.lang.String baseName)
Sets the resource bundle that will provide the error messages. |
void |
setLabelsBundle(java.lang.String baseName)
Sets the resource bundle that will provide the common labels. |
void |
setLogsBundle(java.lang.String baseName)
Sets the resource bundle that will provide the log messages. |
void |
setMenusBundle(java.lang.String baseName)
Sets the resource bundle that will provide the menu labels. |
void |
setMessagesBundle(java.lang.String baseName)
Sets the resource bundle that will provide the common messages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I18n()
I18n
.
Method Detail |
---|
public void setCurrentLocale(java.lang.String language, java.lang.String country)
language
- lowercase two-letter ISO-639 code.country
- uppercase two-letter ISO-3166 code.public java.util.Locale getCurrentLocale()
public void setButtonsBundle(java.lang.String baseName)
baseName
- The base name of the resource bundle that will
provide the button labels (a fully qualified class name).public void setLabelsBundle(java.lang.String baseName)
baseName
- The base name of the resource bundle that will
provide the common labels (a fully qualified class name).public void setMenusBundle(java.lang.String baseName)
baseName
- The base name of the resource bundle that will
provide the menu labels (a fully qualified class name).public void setErrorsBundle(java.lang.String baseName)
baseName
- The base name of the resource bundle that will
provide the error messages (a fully qualified class name).public void setMessagesBundle(java.lang.String baseName)
baseName
- The base name of the resource bundle that will
provide the common messages (a fully qualified class name).public void setLogsBundle(java.lang.String baseName)
baseName
- The base name of the resource bundle that will
provide the log messages (a fully qualified class name).public java.lang.String getButtonLabel(java.lang.String key)
key
- The key for the desired button label.
public java.lang.String getButtonLabel(java.lang.String pattern, java.lang.Object... arguments)
pattern
- The pattern for the desired button label.arguments
- The arguments to be used to format the button label.
public java.lang.String getError(java.lang.String key)
key
- The key for the desired error message.
public java.lang.String getError(java.lang.String pattern, java.lang.Object... arguments)
pattern
- The pattern for the desired error message.arguments
- The arguments to be used to format the error message.
public java.lang.String getLabel(java.lang.String key)
key
- The key for the desired label.
public java.lang.String getLabel(java.lang.String pattern, java.lang.Object... arguments)
pattern
- The pattern for the desired label.arguments
- The arguments to be used to format the label.
public java.lang.String getLogMessage(java.lang.String key)
key
- The key for the desired log message.
public java.lang.String getLogMessage(java.lang.String pattern, java.lang.Object... arguments)
pattern
- The pattern for the desired log message.arguments
- The arguments to be used to format the log message.
public java.lang.String getMenuLabel(java.lang.String key)
key
- The key for the desired menu label.
public java.lang.String getMenuLabel(java.lang.String pattern, java.lang.Object... arguments)
pattern
- The pattern for the desired menu label.arguments
- The arguments to be used to format the menu label.
public java.lang.String getMessage(java.lang.String key)
key
- The key for the desired message.
public java.lang.String getMessage(java.lang.String pattern, java.lang.Object... arguments)
pattern
- The pattern for the desired message.arguments
- The arguments to be used to format the message.
|
juife v0.1a |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2005 Grigor Iliev. All rights reserved. |