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 56102 2012-03-16 13:36:29Z tmattsson $
Author:
philipp

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

Method Detail

getLocale

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


setLocale

void setLocale(Locale locale)

getFallbackLocale

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


setFallbackLocale

void setFallbackLocale(Locale fallbackLocale)

toI18NURI

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


toRawURI

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


determineLocale

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


getNodeData

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

Throws:
javax.jcr.RepositoryException

getNodeData

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


getNode

javax.jcr.Node getNode(javax.jcr.Node node,
                       String name)
                       throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getLocales

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


isEnabled

boolean isEnabled()


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