Index: openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl,v diff -u -N -r1.32.2.2 -r1.32.2.3 --- openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 18 Mar 2004 16:15:55 -0000 1.32.2.2 +++ openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 6 Aug 2004 01:07:02 -0000 1.32.2.3 @@ -310,6 +310,7 @@ } ad_proc -public lang::util::localize { + {-locale ""} string_with_hashes } { Takes a string with embedded message keys on the format #message_key_name# @@ -324,7 +325,9 @@ if { ![string match "*#*" $string_with_hashes] } { return $string_with_hashes } - + if {[string equal "" $locale]} { + set locale [ad_conn locale] + } set indices_list [get_hash_indices $string_with_hashes] set subst_string "" @@ -336,7 +339,7 @@ set message_key [string range $replacement_string 1 [expr [string length $replacement_string] - 2]] # Attempt a message lookup - set message_value [lang::message::lookup [ad_conn locale] $message_key "" "" 2] + set message_value [lang::message::lookup $locale $message_key "" "" 2] # Replace the string # LARS: We don't use regsub here, because regsub interprets certain characters