org.deegree.services.i18n
Class Messages
java.lang.Object
org.deegree.services.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: 10660 $, $Date: 2008-03-24 22:39:54 +0100 (Mo, 24 Mrz 2008) $
- Author:
- Andreas Poth, Ugo Taddei, Markus Schneider, last edited by: $Author: apoth $
- See Also:
Locale.getLanguage()
Method Summary |
static java.lang.String |
get(java.lang.String key,
java.lang.Object... arguments)
Short version for lazy people. |
static java.lang.String |
getMessage(java.util.Locale loc,
java.lang.String key,
java.lang.Object... arguments)
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.Object... arguments)
Returns the message assigned to the passed key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Messages
public Messages()
getMessage
public static java.lang.String getMessage(java.util.Locale loc,
java.lang.String key,
java.lang.Object... arguments)
- Parameters:
loc
- the locale to be usedkey
- to getarguments
- to fill in the message
- Returns:
- the localized 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.
get
public static java.lang.String get(java.lang.String key,
java.lang.Object... arguments)
- Short version for lazy people.
- Parameters:
key
- arguments
-
- Returns:
- the same as #getMessage
Copyright © 2011. All Rights Reserved.