Dear Wiki user, You have subscribed to a wiki page or wiki category on "Turbine Wiki" for change notification.
The "Turbine4/Turbine4.0M1/Migrate233" page has been changed by ThomasVandahl: http://wiki.apache.org/turbine/Turbine4/Turbine4.0M1/Migrate233?action=diff&rev1=4&rev2=5 Comment: Add LocalizationService Start with the [[http://turbine.apache.org/turbine/turbine-4.0-M1/howto/migrate-from-2_3-howto.html|migration guide]] and report about your experiences here. + == Contents == + <<TableOfContents(3)>> + == Migrating Turbine Services to Fulcrum Services == The Turbine services configuration used to live in `WEB-INF/conf/TurbineResources.properties`. The Avalon container uses two files to achieve the same function, namely `WEB-INF/conf/roleConfiguration.xml` to define which component is implemented by which class and `WEB-INF/conf/componentConfiguration.xml` to define the detailed configuration of each component. + + '''Note:''' Most of the static Service Accessor classes have been removed. They need to be replaced by explicit lookups. === AvalonComponentService === @@ -193, +198 @@ </pool> }}} + === LocalizationService === + + The !TurbineLocalizationService has been replaced with the [[http://turbine.apache.org/fulcrum/fulcrum-localization/|Fulcrum Localization]] counterpart. The following example shows the default configuration of the ''!LocalizationService'' before and after the migration. For details of the configuration options available see the [[http://turbine.apache.org/fulcrum/fulcrum-localization/|Fulcrum Localization Site]]. + + `TurbineResources.properties`: + + {{{ + services.LocalizationService.classname=org.apache.turbine.services.localization.TurbineLocalizationService + + # ------------------------------------------------------------------- + # + # L O C A L I Z A T I O N S E R V I C E + # + # ------------------------------------------------------------------- + + # Default ResourceBundle and language/country codes used by the + # TurbineLocalizationService. + # + locale.default.bundles=your.package.Bundle1,your.package.Bundle2 + locale.default.language=en + locale.default.country=US + }}} + + `roleConfiguration.xml`: + + {{{#!xml + <role + name="org.apache.fulcrum.localization.LocalizationService" + shorthand="localization" + default-class="org.apache.fulcrum.localization.DefaultLocalizationService"/> + }}} + + `componentConfiguration.xml`: + + {{{#!xml + <localization> + <bundles locale-default-language="en" locale-default-country="US"> + <bundle>your.package.Bundle1</bundle> + <bundle>your.package.Bundle1</bundle> + </bundles> + </localization> + }}} + --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
