You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by ep...@apache.org on 2003/09/09 17:35:41 UTC

cvs commit: jakarta-turbine-2/xdocs/services localization-service.xml

epugh       2003/09/09 08:35:41

  Modified:    xdocs    changes.xml
               xdocs/services localization-service.xml
  Log:
  Update docs for localization changes
  
  Revision  Changes    Path
  1.61      +17 -0     jakarta-turbine-2/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/xdocs/changes.xml,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- changes.xml	3 Sep 2003 07:47:17 -0000	1.60
  +++ changes.xml	9 Sep 2003 15:35:41 -0000	1.61
  @@ -53,6 +53,23 @@
   </subsection>
   </section>
   -->
  +<section name="Turbine 2.4">
  +<p>
  +Changes between Turbine 2.3 and 2.4.
  +</p>
  +
  +<subsection name="Avalonized Components">
  +<p>
  +  <ul>
  +    <li>
  +	   The localization service within Turbine has been deprecated in favor
  +	   of the Fulcrum Localization service.  The localization pull tool has
  +	   been updated to reflect this.
  +    </li>
  +  </ul>
  +</p>
  +</subsection>
  +</section>
   
   <section name="Turbine 2.3">
   
  
  
  
  1.2       +9 -49     jakarta-turbine-2/xdocs/services/localization-service.xml
  
  Index: localization-service.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/xdocs/services/localization-service.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- localization-service.xml	16 Aug 2001 05:10:44 -0000	1.1
  +++ localization-service.xml	9 Sep 2003 15:35:41 -0000	1.2
  @@ -2,75 +2,35 @@
   
   <document>
    <properties>
  -  <title>Turbine Services - Localization Service</title>
  +  <title>Turbine Tools - Localization Pull Tool</title>
     <author email="jvanzyl@apache.org">Jason van Zyl</author>
  +  <author email="epugh@upstate.com">Eric Pugh</author>
    </properties>
   
   <body>
   
  -<section name="Localization Service">
  +<section name="Localization Tool">
   
   <p>
  -There is a Turbine service that makes it easy to add localization support
  -to your application.
  +This is a tool the provides access to the <a href="http://jakarta.apache.org/turbine/fulcrum/multiproject/fulcrum-localization/index.html">Fulcrum Localization</a> component.
  +This makes it easy to use the Localization Component.  For more uses, you can also directly load up the component.  See the LocalizationToolTest for 
  +sample code.
   </p>
   
   </section>
   
  -<section name="Configuration">
  -
  -<source><![CDATA[
  -# -------------------------------------------------------------------
  -# 
  -#  S E R V I C E S
  -#
  -# -------------------------------------------------------------------
  -# Classes for Turbine Services should be defined here.
  -# Format: services.[name].classname=[implementing class]
  -#
  -# To specify properties of a service use the following syntax:
  -# service.[name].[property]=[value]
  -
  -services.GlobalCacheService.classname=org.apache.turbine.services.cache.TurbineGlobalCacheService
  -.
  -.
  -.
  -]]></source>
  -
  -</section>
  -
   <section name="Usage">
   
   
   <source><![CDATA[
  -
  -TurbineServices.getInstance().getService(LocalizationService.LOCALIZATION)
  -    .getString("DISPLAYPROJECTS_TITLE");
  -
  -]]></source>
  -
  -<p>
  -Wow. That is a lot of typing. That could be easily shortened to this:
  -</p>
  -
  -<source><![CDATA[
  -
  -Localization.getString("DISPLAYPROJECTS_TITLE");
  +localizationTool = (LocalizationTool)context.get("l10n");
  +localizationTool.getString("DISPLAYPROJECTS_TITLE");
   
   ]]></source>
   
   <p>
  -The hard example above was given as an example of using Services. The easy
  -example is the one that you really should be using. Another cool feature
  -of the Localization class is that you can pass in a RunData object like
  -this:
  +This is an example of using the localization pull tool.
   </p>
  -
  -<source><![CDATA[
  -
  -Localization.getString(data, "DISPLAYPROJECTS_TITLE");
  -
  -]]></source>
   
   <p>
   This has the added effect of using the Accept-Language HTTP header to determine