deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.i18n
Class Messages

java.lang.Object
  extended by org.deegree.i18n.Messages

public class Messages
extends java.lang.Object

Responsible for the access to messages that are visible to the user.

Messages are read from the properties file messages_LANG.properties (LANG is always a lowercased ISO 639 code), so internationalization is supported. If a certain property (or the property file) for the specific default language of the system is not found, the message is taken from messages_en.properties.

Version:
$Revision: 26673 $, $Date: 2010-09-10 12:58:10 +0200 (Fr, 10 Sep 2010) $
Author:
Andreas Poth, Ugo Taddei, Markus Schneider, last edited by: $Author: apoth $
See Also:
Locale.getLanguage()

Constructor Summary
Messages()
           
 
Method Summary
static java.lang.String get(java.util.Locale loc, java.lang.String key, java.lang.Object... arguments)
           
static java.lang.String get(java.lang.String key, java.lang.Object... arguments)
          Alias for #getMessage.
static java.lang.String getMessage(java.lang.String key, java.lang.Object... arguments)
          Returns the message assigned to the passed key.
static java.util.Properties getProperties(java.util.Locale locale)
           
 
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(java.util.Locale loc,
                                   java.lang.String key,
                                   java.lang.Object... arguments)
Parameters:
loc - the locale to be used
key - to get
arguments - to fill in the message
Returns:
the localized message

getProperties

public static java.util.Properties getProperties(java.util.Locale locale)
Parameters:
locale -
Returns:
copy of complete list of properties

get

public static java.lang.String get(java.lang.String key,
                                   java.lang.Object... arguments)
Alias for #getMessage.

Parameters:
key -
arguments -
Returns:
the message

getMessage

public static java.lang.String getMessage(java.lang.String key,
                                          java.lang.Object... arguments)
Returns the message assigned to the passed key. If no message is assigned, an error message will be returned that indicates the missing key.

Parameters:
key -
arguments -
Returns:
the message assigned to the passed key
See Also:
for conventions on string formatting and escape characters.

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org