--- loncom/localize/lonlocal.pm 2003/09/16 15:23:43 1.1 +++ loncom/localize/lonlocal.pm 2003/09/16 22:40:25 1.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Localization routines # -# $Id: lonlocal.pm,v 1.1 2003/09/16 15:23:43 www Exp $ +# $Id: lonlocal.pm,v 1.3 2003/09/16 22:40:25 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,6 +32,7 @@ package Apache::lonlocal; use strict; use Apache::localize; +use Apache::File; require Exporter; @@ -45,13 +46,22 @@ use vars qw($lh); # ===================================================== The "MakeText" function sub mt (@) { - return $lh->maketext(@_); + unless ($ENV{'environment.translator'}) { + return $lh->maketext(@_); + } else { + return ''.$lh->maketext(@_).''; + } } # ========= Get a handle (do not invoke in vain, leave this to access handlers) sub get_language_handle { - $lh=Apache::localize->get_handle(); + $lh=Apache::localize->get_handle(&Apache::loncommon::preferred_languages); } 1;