@Singleton public class DefaultMessagesManager extends MessagesManager
Modifier and Type | Class and Description |
---|---|
static class |
DefaultMessagesManager.MessagesID
Used as the key in the Map.
|
DEFAULT_BASENAME, FALLBACK_LOCALE, FALLBACK_NODEDATA, I18N_CONFIG_PATH, LANGUAGES_NODE_NAME
Constructor and Description |
---|
DefaultMessagesManager()
Deprecated.
since 5.5.1 - use
DefaultMessagesManager(info.magnolia.jcr.node2bean.Node2BeanProcessor, info.magnolia.context.SystemContext) instead. |
DefaultMessagesManager(Node2BeanProcessor nodeToBean)
Deprecated.
since 5.5.1 - use
DefaultMessagesManager(info.magnolia.jcr.node2bean.Node2BeanProcessor, info.magnolia.context.SystemContext) instead. |
DefaultMessagesManager(Node2BeanProcessor nodeToBean,
SystemContext systemContext) |
Modifier and Type | Method and Description |
---|---|
Collection |
getAvailableLocales() |
Locale |
getDefaultLocale() |
Messages |
getMessagesInternal(String basename,
Locale locale) |
void |
init()
Called through the initialization process.
|
protected void |
initMap()
The lazy Map creates messages objects with a fall back to the default locale.
|
protected void |
load()
Load i18n configuration.
|
protected Messages |
newMessages(DefaultMessagesManager.MessagesID messagesID)
Initializes a new Messages instances for the given MessagesID.
|
void |
reload()
Reload i18n configuration.
|
void |
setDefaultLocale(String defaultLocale)
Deprecated.
since 4.0 - not used and should not be. Use setLocale() on the SystemContext instead. --note: do not
remove the method, make it private. applicationLocale field is still needed. --and/or remove duplication with
SystemContext.locale
|
void |
setMessages(Map messages) |
get, get, getInstance, getMessages, getMessages, getMessages, getMessages, getWithDefault, getWithDefault
@Inject public DefaultMessagesManager(Node2BeanProcessor nodeToBean, SystemContext systemContext)
@Deprecated public DefaultMessagesManager()
DefaultMessagesManager(info.magnolia.jcr.node2bean.Node2BeanProcessor, info.magnolia.context.SystemContext)
instead.@Deprecated public DefaultMessagesManager(Node2BeanProcessor nodeToBean)
DefaultMessagesManager(info.magnolia.jcr.node2bean.Node2BeanProcessor, info.magnolia.context.SystemContext)
instead.public void init()
init
in class MessagesManager
protected void initMap()
protected Messages newMessages(DefaultMessagesManager.MessagesID messagesID)
protected void load()
public void reload()
reload
in class MessagesManager
public Messages getMessagesInternal(String basename, Locale locale)
getMessagesInternal
in class MessagesManager
public Locale getDefaultLocale()
getDefaultLocale
in class MessagesManager
@Deprecated public void setDefaultLocale(String defaultLocale)
defaultLocale
- The defaultLocale to set.public Collection getAvailableLocales()
getAvailableLocales
in class MessagesManager
public void setMessages(Map messages)
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.