net.i2p.i2ptunnel.web
Class Messages

java.lang.Object
  extended by net.i2p.i2ptunnel.web.Messages

public class Messages
extends java.lang.Object

Translate strings for this package.

Since:
0.7.9

Constructor Summary
Messages()
           
 
Method Summary
 java.lang.String _(java.lang.String key)
          lang in routerconsole.lang property, else current locale
static java.lang.String _(java.lang.String key, I2PAppContext ctx)
           
 java.lang.String _(java.lang.String s, java.lang.Object o)
          translate a string with a parameter This is a lot more expensive than getString(s, ctx), so use sparingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
Method Detail

_

public java.lang.String _(java.lang.String key)
lang in routerconsole.lang property, else current locale


_

public static java.lang.String _(java.lang.String key,
                                 I2PAppContext ctx)

_

public java.lang.String _(java.lang.String s,
                          java.lang.Object o)
translate a string with a parameter This is a lot more expensive than getString(s, ctx), so use sparingly.

Parameters:
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.