info.magnolia.cms.i18n
Interface I18nContentSupport

All Known Implementing Classes:
AbstractI18nContentSupport, DefaultI18nContentSupport, HierarchyBasedI18nContentSupport, RequestLocaleAwareI18nContentSupport

public interface I18nContentSupport

Support for i18n content. Used to rewrite uris and getting nodedatas based on the current language.

Version:
$Id: I18nContentSupport.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
philipp

Method Summary
 java.util.Locale determineLocale()
          This method uses the current agregation state to set the locale used for the rendering process .
 java.util.Locale getFallbackLocale()
          The default locale to be used.
 java.util.Locale getLocale()
          Get the current locale used for rendering content.
 java.util.Collection<java.util.Locale> getLocales()
          Returns the available locales.
 NodeData getNodeData(Content node, java.lang.String name)
          Returns the NodeData object based on the current language.
 NodeData getNodeData(Content node, java.lang.String name, java.util.Locale locale)
          Returns the NodeData object based on the language passes.
 boolean isEnabled()
           
 void setFallbackLocale(java.util.Locale fallbackLocale)
           
 void setLocale(java.util.Locale locale)
           
 java.lang.String toI18NURI(java.lang.String uri)
          Transform the internal uri to a i18n uri.
 java.lang.String toRawURI(java.lang.String i18nURI)
          Remove all i18n tokens form the uri.
 

Method Detail

getLocale

java.util.Locale getLocale()
Get the current locale used for rendering content.


setLocale

void setLocale(java.util.Locale locale)

getFallbackLocale

java.util.Locale getFallbackLocale()
The default locale to be used. Can be used to fix the system to a certain language.


setFallbackLocale

void setFallbackLocale(java.util.Locale fallbackLocale)

toI18NURI

java.lang.String toI18NURI(java.lang.String uri)
Transform the internal uri to a i18n uri. This method may add a prefix or suffix


toRawURI

java.lang.String toRawURI(java.lang.String i18nURI)
Remove all i18n tokens form the uri. The uri can then be used to get the content.


determineLocale

java.util.Locale determineLocale()
This method uses the current agregation state to set the locale used for the rendering process .


getNodeData

NodeData getNodeData(Content node,
                     java.lang.String name,
                     java.util.Locale locale)
                     throws javax.jcr.RepositoryException
Returns the NodeData object based on the language passes.

Throws:
javax.jcr.RepositoryException

getNodeData

NodeData getNodeData(Content node,
                     java.lang.String name)
Returns the NodeData object based on the current language.


getLocales

java.util.Collection<java.util.Locale> getLocales()
Returns the available locales.


isEnabled

boolean isEnabled()


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