|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.i2ptunnel.web.Messages
public class Messages
Translate strings for this package.
Constructor Summary | |
---|---|
Messages()
|
Method Summary | |
---|---|
String |
_(String key)
lang in routerconsole.lang property, else current locale |
static String |
_(String key,
I2PAppContext ctx)
|
String |
_(String s,
Object o)
translate a string with a parameter This is a lot more expensive than getString(s, ctx), so use sparingly. |
static String |
ngettext(String s,
String p,
int n,
I2PAppContext ctx)
translate (ngettext) |
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 String _(String key)
public static String _(String key, I2PAppContext ctx)
public String _(String s, Object o)
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.public static String ngettext(String s, String p, int n, I2PAppContext ctx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |