|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.util.Translate
net.i2p.router.web.Messages
public class Messages
Translate strings for this package.
Field Summary |
---|
Fields inherited from class net.i2p.util.Translate |
---|
PROP_LANG |
Constructor Summary | |
---|---|
Messages()
|
Method Summary | |
---|---|
static java.lang.String |
getString(java.lang.String key,
I2PAppContext ctx)
lang in routerconsole.lang property, else current locale |
static java.lang.String |
getString(java.lang.String s,
java.lang.Object o,
I2PAppContext ctx)
translate a string with a parameter This is a lot more expensive than getString(s, ctx), so use sparingly. |
Methods inherited from class net.i2p.util.Translate |
---|
getLanguage, getString, getString, getString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Messages()
Method Detail |
---|
public static java.lang.String getString(java.lang.String key, I2PAppContext ctx)
public static java.lang.String getString(java.lang.String s, java.lang.Object o, I2PAppContext ctx)
s
- string to be translated containing {0}
The {0} will be replaced by the parameter.
Single quotes must be doubled, i.e. ' -> '' in the string.o
- parameter, not translated.
To tranlslate parameter also, use _("foo {0} bar", _("baz"))
Do not double the single quotes in the parameter.
Use autoboxing to call with ints, longs, floats, etc.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |