play.i18n
Class Messages

java.lang.Object
  extended by play.i18n.Messages

public class Messages
extends java.lang.Object

High-level internationalisation API.


Constructor Summary
Messages()
           
 
Method Summary
static java.lang.String get(Lang lang, java.lang.String key, java.lang.Object... args)
          Translates a message.
static java.lang.String get(java.lang.String key, java.lang.Object... args)
          Translates a message.
 
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

get

public static java.lang.String get(Lang lang,
                                   java.lang.String key,
                                   java.lang.Object... args)
Translates a message. Uses `java.text.MessageFormat` internally to format the message.

Parameters:
lang - the message lang
key - the message key
args - the message arguments
Returns:
the formatted message or a default rendering if the key wasn't defined

get

public static java.lang.String get(java.lang.String key,
                                   java.lang.Object... args)
Translates a message. Uses `java.text.MessageFormat` internally to format the message.

Parameters:
key - the message key
args - the message arguments
Returns:
the formatted message or a default rendering if the key wasn't defined