|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.services.i18n.MCRTranslation
public class MCRTranslation
provides services for internationalization in mycore application. You have to provide a property file named messages.properties in your classpath for this class to work.
| Constructor Summary | |
|---|---|
MCRTranslation()
|
|
| Method Summary | |
|---|---|
(package private) static String[] |
getStringArray(String masked)
|
(package private) static boolean |
isArray(String masked)
|
(package private) static Properties |
loadProperties()
|
static String |
translate(String label)
provides translation for the given label (property key). |
static String |
translate(String label,
Object[] arguments)
provides translation for the given label (property key). |
static String |
translate(String label,
String argument)
provides translation for the given label (property key). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCRTranslation()
| Method Detail |
|---|
public static String translate(String label)
label -
public static String translate(String label,
Object[] arguments)
label - arguments - Objects that are inserted instead of placeholders in the
property values
public static String translate(String label,
String argument)
argument has to be masked by '\'. You can use
';' to build an array of arguments: "foo;bar" would result in
{"foo","bar"} (the array)
label - argument - String that is inserted instead of placeholders in the
property values
translate(String, Object[])static String[] getStringArray(String masked)
static boolean isArray(String masked)
static Properties loadProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||