public class Messages extends Object
| Constructor and Description |
|---|
Messages()Default constructor, uses global context |
| Modifier and Type | Method and Description |
|---|---|
String | _t(String key)Translate a key to the current locale. |
static String | getString(int n,
String s,
String p)Get a translated pluralized string based on a count. |
static String | getString(String s)Get a translated string for the given key. |
static String | getString(String s,
Object o)Get a translated string with a parameter. |
static String | getString(String s,
Object o,
Object o2)Get a translated string with two parameters. |
public String _t(String key)
key - the message keypublic static String getString(int n, String s, String p)
n - the counts - singular formp - plural formpublic static String getString(String s)
s - the message keypublic static String getString(String s, Object o)
s - the message keyo - the parameter