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 -r1.54.2.5 -r1.54.2.6 --- openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 18 May 2020 21:20:20 -0000 1.54.2.5 +++ openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 17 Jun 2020 09:56:14 -0000 1.54.2.6 @@ -384,15 +384,23 @@ @see lang::util::default_locale_from_lang } { - return [db_string default_locale_from_lang { + set locales [db_list locales_from_lang { select locale from ad_locales l where language = :language and enabled_p and (default_p or not exists (select 1 from ad_locales where language = :language and locale <> l.locale)) - } -default ""] + }] + if {[llength $locales] > 1} { + ad_log error "multiple locales '$locales' defined for language '$language'. Change configuration on /acs-lang/admin" + set locales [lindex $locales 0] + } + # + # return 0 or 1 locale + # + return $locales } ad_proc -public lang::util::default_locale_from_lang {