--- Prefs.pm.orig 2005-01-22 01:37:18.000000000 -0200 +++ Prefs.pm 2005-01-22 14:40:38.000000000 -0200 @@ -669,7 +669,22 @@ { my $textRef = \$_[0]; + # picks LANGWEB, maybe from session. If we do have a defined LANGWEB, + # use it. This makes the session value (set by SesionPlugin) + # have precedence over the preferences one (set by * Set LANGWEB = ...) + my $langweb = getPreferencesValue("LANGWEB"); + + # substitute LANGWEB + if ($langweb) { + $$textRef =~ s/%LANGWEB%/$langweb/ge; + } + $requestPrefs->replacePreferencesTags($$textRef); + + # substitute LANGWEB again, because preferences can (they should) use it. + if ($langweb) { + $$textRef =~ s/%LANGWEB%/$langweb/ge; + } if( $$textRef =~ /\%VAR{(.*?)}\%/ ) { # handle web specific variables