Index: openacs-4/packages/acs-lang/tcl/locale-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/locale-procs.tcl,v diff -u -r1.51.2.2 -r1.51.2.3 --- openacs-4/packages/acs-lang/tcl/locale-procs.tcl 30 Sep 2019 19:06:05 -0000 1.51.2.2 +++ openacs-4/packages/acs-lang/tcl/locale-procs.tcl 19 Jan 2020 20:34:25 -0000 1.51.2.3 @@ -527,6 +527,7 @@ ad_proc -public lang::conn::locale { {-package_id ""} {-site_wide:boolean} + {-user_id ""} } { Get the locale for this request, perhaps for a given package instance. This procedure will never return an error. Everything that could fail is @@ -551,7 +552,7 @@ # use user's package level locale - set locale [lang::user::package_level_locale $package_id] + set locale [lang::user::package_level_locale -user_id $user_id $package_id] # if that does not exist use system's package level locale @@ -562,12 +563,12 @@ # if that does not exist use user's site wide locale if { $locale eq "" } { - set locale [lang::user::site_wide_locale] + set locale [lang::user::site_wide_locale -user_id $user_id] } # Use the accept-language browser heading - if { $locale eq "" } { + if { $locale eq "" && [ns_conn isconnected]} { set locale [lang::conn::browser_locale] }