info.magnolia.ui.framework.i18n
Class DefaultI18NAuthoringSupport
java.lang.Object
info.magnolia.ui.framework.i18n.DefaultI18NAuthoringSupport
- All Implemented Interfaces:
- info.magnolia.ui.api.i18n.I18NAuthoringSupport
public class DefaultI18NAuthoringSupport
- extends Object
- implements info.magnolia.ui.api.i18n.I18NAuthoringSupport
Default implementation of I18NAuthoringSupport
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultI18NAuthoringSupport
public DefaultI18NAuthoringSupport()
getAvailableLocales
public List<Locale> getAvailableLocales(javax.jcr.Node node)
- Returns the available locales for the given page, area or component node.
Please note though that this default implementation exclusively resolves locales through i18nContentSupport
,
i.e. as configured in /server/i18n/content/locales, regardless of the passed node.
- Specified by:
getAvailableLocales
in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport
- Returns:
- the list of locales if both i18nAuthoringSupport and i18nContentSupport are enabled,
null
otherwise.
getDefaultLocale
public Locale getDefaultLocale(javax.jcr.Node node)
- Returns the default locale for the given page, area or component node.
TODO: create interface method in
I18NAuthoringSupport
i18nize
public void i18nize(com.vaadin.ui.HasComponents fieldContainer,
Locale locale)
- Specified by:
i18nize
in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport
createI18NURI
public String createI18NURI(javax.jcr.Node node,
Locale locale)
- Specified by:
createI18NURI
in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(boolean enabled)
getAuthorLocale
public Locale getAuthorLocale()
- Specified by:
getAuthorLocale
in interface info.magnolia.ui.api.i18n.I18NAuthoringSupport
setAuthorLocale
public void setAuthorLocale(Locale locale)
Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.