[Opensrf-commits] r1138 - trunk/src/perlmods/OpenSRF

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 20 15:39:56 EST 2007


Author: miker
Date: 2007-11-20 15:22:22 -0500 (Tue, 20 Nov 2007)
New Revision: 1138

Modified:
   trunk/src/perlmods/OpenSRF/AppSession.pm
Log:
propogate locale from server to client

Modified: trunk/src/perlmods/OpenSRF/AppSession.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/AppSession.pm	2007-11-20 20:04:28 UTC (rev 1137)
+++ trunk/src/perlmods/OpenSRF/AppSession.pm	2007-11-20 20:22:22 UTC (rev 1138)
@@ -21,6 +21,7 @@
 );
 
 my $logger = "OpenSRF::Utils::Logger";
+my $_last_locale = 'en-US';
 
 our %_CACHE;
 our @_RESEND_QUEUE;
@@ -159,6 +160,7 @@
 sub session_locale {
 	my( $self, $type ) = @_;
 	if( $type ) {
+        $_last_locale = $type if ($self->endpoint == SERVER);
 		return $self->{'session_locale'} = $type;
 	}
 	return $self->{'session_locale'};
@@ -207,7 +209,7 @@
 	my $app = shift;
         my $api_level = shift;
 	my $quiet = shift;
-	my $locale = shift;
+	my $locale = shift || $_last_locale;
 
 	$api_level = 1 if (!defined($api_level));
 			        



More information about the opensrf-commits mailing list