cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kjetil Kjernsmo <Kjetil.Kjern...@computas.com>
Subject [2.2] Configuring LocaleAction
Date Thu, 22 May 2008 12:42:51 GMT
Hi there!

I need to get to the user's language, partly based on a request parameter, 
partly the Accept-Languages HTTP header. LocaleAction is not documented in 
2.2, but looking into the code, it seems like it can do this. Correct?

Now, I want to stuff this into a parameter interface-language that I have 
allready coded in many places. I have e.g. this:

      <map:match pattern="search-result">
        <map:call 
function="com.computas.sublima.app.controller.SearchController">
          <map:parameter name="mode" value="search-result"/>
          <map:parameter name="interface-language" value="no"/>
        </map:call>
      </map:match>

But since all pages are localised, this parameter should be sent to everything 
in the sitemap. 

Is there an easy way to do this, so that I can set it in just one place? 

if not, do I need to put

   <map:act type="locale">
     <map:parameter name="interface-language" value="{language}"/>
   </map:act>
 
into every map:match I have? If so, would I need to code the above example 
like this:

     <map:match pattern="search-result">
       <map:act type="locale">
         <map:call 
function="com.computas.sublima.app.controller.SearchController">
            <map:parameter name="mode" value="search-result"/>
            <map:parameter name="interface-language" value="{language}"/>
          </map:call>
        </map:act>
        <map:call 
function="com.computas.sublima.app.controller.SearchController">
          <map:parameter name="mode" value="search-result"/>
          <map:parameter name="interface-language" value="no"/>
        </map:call>
      </map:match>

?

BTW, there are lots of XML errors in the 2.1 docs for this.

Kind regards 

Kjetil Kjernsmo
-- 
Senior Knowledge Engineer
Direct: +47 6783 1136 | Mobile: +47 986 48 234
Email: kjetil.kjernsmo@computas.com   
Web: http://www.computas.com/

|  SHARE YOUR KNOWLEDGE  |

Computas AS  Vollsveien 9, PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | 
Fax:+47 6783 1001


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message