public class DSpaceI18NTransformer
extends org.apache.cocoon.transformation.I18nTransformer
This transformer modified the base configuration by adding two
<location/> parameters for each aspect into the default catalogue.
The first location parameter is contained within the catalogue's
base location + the aspect path. The second location parameter is
located inside the aspect's path + "/i18n/"
This allows aspect developers to place their default messages files inside the aspect, and place translations into various languages inside the base i18n/ directory.
EXAMPLE:
For instance, let's say that the i18n transformer's configuration were as follows:
<catalogues default="default">
<catalogue id="default" name="messages" aspects="true">
<location>context://i18n</location>
</catalogue>
</catalogues>
And there were two aspects installed:
<aspect name="Browse Artifacts" path="resource://aspects/BrowseArtifacts/" />
<aspect name="Administration" path="resource://aspects/Administrative/" />
The effective configuration would be:
<catalogues default="default">
<catalogue id="default" name="messages" aspects="true">
<location>context://i18n/</location>
<location>context://i18n/aspects/BrowseArtifacts</location>
<location>resource://aspects/BrowseArtifacts/i18n/</location>
<location>context://i18n/aspects/Administrative</location>
<location>resource://aspects/Administrative/i18n/</location>
</catalogue>
</catalogues>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BASE_LOCATION |
CURRENCY_LOCALE_ATTRIBUTE, factory, I18N_ATTR_ATTRIBUTE, I18N_CATALOGUE_ATTRIBUTE, I18N_CHOOSE_ELEMENT, I18N_CURRENCY_ELEMENT, I18N_CURRENCY_NO_UNIT_ELEMENT, I18N_DATE_ELEMENT, I18N_DATE_TIME_ELEMENT, I18N_DEFAULT_CATALOGUE_ID, I18N_EXPR_ATTRIBUTE, I18N_FRACTION_DIGITS_ATTRIBUTE, I18N_IF_ELEMENT, I18N_INT_CURRENCY_ELEMENT, I18N_INT_CURRENCY_NO_UNIT_ELEMENT, I18N_KEY_ATTRIBUTE, I18N_LOCALE, I18N_LOCALE_ATTRIBUTE, I18N_NAMESPACE_URI, I18N_NUMBER_ELEMENT, I18N_OLD_NAMESPACE_URI, I18N_OTHERWISE_ELEMENT, I18N_PARAM_ELEMENT, I18N_PARAM_NAME_ATTRIBUTE, I18N_PATTERN_ATTRIBUTE, I18N_PERCENT_ELEMENT, I18N_PRELOAD, I18N_SRC_LOCALE_ATTRIBUTE, I18N_SRC_PATTERN_ATTRIBUTE, I18N_TEXT_ELEMENT, I18N_TIME_ELEMENT, I18N_TRANSLATE_ELEMENT, I18N_TYPE_ATTRIBUTE, I18N_UNTRANSLATED, I18N_VALUE_ATTRIBUTE, I18N_WHEN_ELEMENT, locale, manager, objectModel| Constructor and Description |
|---|
DSpaceI18NTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration originalConf)
Intercept the configuration parameters coming from the Cocoon sitemap before
they are read by the cocoon i18n transformer.
|
characters, dispose, endElement, getKey, getLocale, getMessage, getValidity, recycle, service, setup, startElementcomment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMappingsetConsumer, setContentHandler, setLexicalHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMappingcomment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntitypublic static final String DEFAULT_BASE_LOCATION
public void configure(org.apache.avalon.framework.configuration.Configuration originalConf)
throws org.apache.avalon.framework.configuration.ConfigurationException
<location> parameters for each.configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class org.apache.cocoon.transformation.I18nTransformeroriginalConf - the intercepted configuration.org.apache.avalon.framework.configuration.ConfigurationException - passed through.Copyright © 2016 DuraSpace. All rights reserved.