portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions JetspeedSessionValidator.java
Date Thu, 08 Mar 2001 16:25:49 GMT
ingo        01/03/08 08:25:49

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        JetspeedSessionValidator.java
  Log:
  [MLS] Multi- markup & language support. First "simple" implementation.
  
  Revision  Changes    Path
  1.5       +14 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java
  
  Index: JetspeedSessionValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JetspeedSessionValidator.java	2001/03/07 06:43:37	1.4
  +++ JetspeedSessionValidator.java	2001/03/08 16:25:40	1.5
  @@ -54,6 +54,9 @@
    
   package org.apache.jetspeed.modules.actions;
   
  +import java.util.Locale;
  +import org.apache.turbine.services.localization.LocaleDetector;
  +
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.services.security.TurbineSecurity;
   import org.apache.turbine.modules.actions.sessionvalidator.SessionValidator;
  @@ -66,7 +69,7 @@
   
   @see org.apache.turbine.actions.SessionValidator
   @author <a href="mailto:ingo@raleigh.ibm.com">Ingo Schuster</a>
  -@version $Id: JetspeedSessionValidator.java,v 1.4 2001/03/07 06:43:37 taylor Exp $
  +@version $Id: JetspeedSessionValidator.java,v 1.5 2001/03/08 16:25:40 ingo Exp $
   */
   public class JetspeedSessionValidator extends SessionValidator
   {
  @@ -88,6 +91,16 @@
               data.save();
           }
   
  +        // Get the locale store it in the user object
  +        Locale locale = LocaleDetector.getLocale(data);
  +        if (locale == null) {
  +            locale = new Locale(
  +                     TurbineResources.getString("locale.default.language", "en"),
  +                     TurbineResources.getString("locale.default.country", "US"));
  +        }
  +        
  +       	data.getUser().setTemp("locale", locale);
  +        
           // make sure we have some way to return a response
           if ( !data.hasScreen() &&
               data.getTemplateInfo().getScreenTemplate() == null )
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message