info.magnolia.cms.i18n
Class MessagesManager

java.lang.Object
  extended by info.magnolia.cms.i18n.MessagesManager
Direct Known Subclasses:
DefaultMessagesManager

Deprecated. since 5.1.1. You should use info.magnolia.i18nsystem mechanism instead.

public abstract class MessagesManager
extends Object

From this class you get the i18n messages. You should pass a request, but if you can't the getMessages method will handle it properly. The get() methods are easy to use.

See Also:
info.magnolia.i18nsystem

Field Summary
static String DEFAULT_BASENAME
          Deprecated. Use this basename if no other is provided.
static String FALLBACK_LOCALE
          Deprecated. Use this locale if no other provided.
static String FALLBACK_NODEDATA
          Deprecated. The name of the property to store the current system language.
static String I18N_CONFIG_PATH
          Deprecated. The node name where the configuration for i18n is stored.
static String LANGUAGES_NODE_NAME
          Deprecated. Under this node all the available languages are stored.
 
Constructor Summary
MessagesManager()
          Deprecated.  
 
Method Summary
static String get(String key)
          Deprecated.  
static String get(String key, Object[] args)
          Deprecated. Get a message with parameters inside: the value {0} must be a number.
abstract  Collection getAvailableLocales()
          Deprecated.  
abstract  Locale getDefaultLocale()
          Deprecated.  
static MessagesManager getInstance()
          Deprecated. since 4.5, use IoC !
static Messages getMessages()
          Deprecated.  
static Messages getMessages(Locale locale)
          Deprecated.  
static Messages getMessages(String basename)
          Deprecated.  
static Messages getMessages(String basename, Locale locale)
          Deprecated.  
protected abstract  Messages getMessagesInternal(String basename, Locale locale)
          Deprecated.  
static String getWithDefault(String key, Object[] args, String defaultMsg)
          Deprecated. Get a message with parameters inside: the value {0} must be a number.
static String getWithDefault(String key, String defaultMsg)
          Deprecated. Use a default string.
abstract  void init()
          Deprecated.  
abstract  void reload()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FALLBACK_LOCALE

public static final String FALLBACK_LOCALE
Deprecated. 
Use this locale if no other provided.

See Also:
Constant Field Values

DEFAULT_BASENAME

public static final String DEFAULT_BASENAME
Deprecated. 
Use this basename if no other is provided.

See Also:
Constant Field Values

I18N_CONFIG_PATH

public static final String I18N_CONFIG_PATH
Deprecated. 
The node name where the configuration for i18n is stored.

See Also:
Constant Field Values

FALLBACK_NODEDATA

public static final String FALLBACK_NODEDATA
Deprecated. 
The name of the property to store the current system language.

See Also:
Constant Field Values

LANGUAGES_NODE_NAME

public static final String LANGUAGES_NODE_NAME
Deprecated. 
Under this node all the available languages are stored. They are showed in the user dialog.

See Also:
Constant Field Values
Constructor Detail

MessagesManager

public MessagesManager()
Deprecated. 
Method Detail

getInstance

public static MessagesManager getInstance()
Deprecated. since 4.5, use IoC !


getMessages

public static Messages getMessages()
Deprecated. 

getMessages

public static Messages getMessages(String basename)
Deprecated. 

getMessages

public static Messages getMessages(Locale locale)
Deprecated. 

getMessages

public static Messages getMessages(String basename,
                                   Locale locale)
Deprecated. 

get

public static String get(String key)
Deprecated. 

get

public static String get(String key,
                         Object[] args)
Deprecated. 
Get a message with parameters inside: the value {0} must be a number.

Parameters:
key - key to find
args - replacement strings
Returns:
the message

getWithDefault

public static String getWithDefault(String key,
                                    String defaultMsg)
Deprecated. 
Use a default string.

Parameters:
key - key to find
defaultMsg - default message
Returns:
the message

getWithDefault

public static String getWithDefault(String key,
                                    Object[] args,
                                    String defaultMsg)
Deprecated. 
Get a message with parameters inside: the value {0} must be a number. Use a default message.

Parameters:
key - key to find
args - replacement strings
defaultMsg - default message
Returns:
the message

init

public abstract void init()
Deprecated. 

getAvailableLocales

public abstract Collection getAvailableLocales()
Deprecated. 

getDefaultLocale

public abstract Locale getDefaultLocale()
Deprecated. 

getMessagesInternal

protected abstract Messages getMessagesInternal(String basename,
                                                Locale locale)
Deprecated. 

reload

public abstract void reload()
Deprecated. 


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.