info.magnolia.cms.i18n
Class DefaultI18nContentSupport

java.lang.Object
  extended by info.magnolia.cms.i18n.AbstractI18nContentSupport
      extended by info.magnolia.cms.i18n.DefaultI18nContentSupport
All Implemented Interfaces:
I18nContentSupport

public class DefaultI18nContentSupport
extends AbstractI18nContentSupport

This implementation support a language prefix like /en/*. To resolve the nodedatas it checks if a nodedata with the following pattern exists on the content node: <name>_<language>

Version:
$Id$
Author:
philipp

Field Summary
 
Fields inherited from class info.magnolia.cms.i18n.AbstractI18nContentSupport
defaultLocale
 
Constructor Summary
DefaultI18nContentSupport()
           
 
Method Summary
protected  Locale onDetermineLocale()
           
protected  String toI18NURI(String uri, Locale locale)
          Adds the language prefix to the uri.
protected  String toRawURI(String i18nURI, Locale locale)
           
 
Methods inherited from class info.magnolia.cms.i18n.AbstractI18nContentSupport
addLocale, determineLocale, determineLocalFromString, getDefaultLocale, getFallbackLocale, getLocale, getLocales, getNextContentLocale, getNextLocale, getNode, getNodeData, getNodeData, getProperty, getProperty, hasProperty, isEmpty, isEmpty, isEnabled, isLocaleSupported, setDefaultLocale, setEnabled, setFallbackLocale, setLocale, toI18NURI, toRawURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultI18nContentSupport

public DefaultI18nContentSupport()
Method Detail

toI18NURI

protected String toI18NURI(String uri,
                           Locale locale)
Adds the language prefix to the uri.

Specified by:
toI18NURI in class AbstractI18nContentSupport

toRawURI

protected String toRawURI(String i18nURI,
                          Locale locale)
Specified by:
toRawURI in class AbstractI18nContentSupport

onDetermineLocale

protected Locale onDetermineLocale()
Specified by:
onDetermineLocale in class AbstractI18nContentSupport


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.