net.i2p.router.web
Class Messages

java.lang.Object
  extended by net.i2p.util.Translate
      extended by net.i2p.router.web.Messages

public class Messages
extends Translate

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(int n, java.lang.String s, java.lang.String p, I2PAppContext ctx)
          translate (ngettext) @since 0.7.14
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.
static java.lang.String getString(java.lang.String s, java.lang.Object o, java.lang.Object o2, I2PAppContext ctx)
          two params @since 0.7.14
 
Methods inherited from class net.i2p.util.Translate
clearCache, getLanguage, getString, getString, getString, getString
 
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

getString

public static java.lang.String getString(java.lang.String key,
                                         I2PAppContext ctx)
lang in routerconsole.lang property, else current locale


getString

public 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.

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.

getString

public static java.lang.String getString(java.lang.String s,
                                         java.lang.Object o,
                                         java.lang.Object o2,
                                         I2PAppContext ctx)
two params @since 0.7.14


getString

public static java.lang.String getString(int n,
                                         java.lang.String s,
                                         java.lang.String p,
                                         I2PAppContext ctx)
translate (ngettext) @since 0.7.14