Class DefaultLocalizationService

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.localization.SimpleLocalizationServiceImpl
org.apache.fulcrum.localization.DefaultLocalizationService
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, LocalizationService, SimpleLocalizationService

public class DefaultLocalizationService extends SimpleLocalizationServiceImpl implements LocalizationService

This class is the single point of access to all localization resources. It caches different ResourceBundles for different Locales.

Usage example:

 
 LocalizationService ls = (LocalizationService) TurbineServices
     .getInstance().getService(LocalizationService.SERVICE_NAME);
 
 

Then call SimpleLocalizationServiceImpl.getString(String, Locale, String), or one of four methods to retrieve a ResourceBundle:

  • getBundle("MyBundleName")
  • getBundle("MyBundleName", httpAcceptLanguageHeader)
  • etBundle("MyBundleName", HttpServletRequest)
  • getBundle("MyBundleName", Locale)
  • etc.
Version:
$Id$ avalon.component name="localization" lifestyle="singleton" avalon.service type="org.apache.fulcrum.localization.LocalizationService"
Author:
Jonas Maurus, Jon S. Stevens, Frank Y. Kim, Daniel Rall, Leonard Richardson, Stephen McConnell, Thomas Vandahl
  • Constructor Details

    • DefaultLocalizationService

      public DefaultLocalizationService()
      Creates a new instance.
  • Method Details