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.25 -r1.26 --- openacs-4/packages/acs-lang/tcl/locale-procs.tcl 11 Dec 2003 21:39:53 -0000 1.25 +++ openacs-4/packages/acs-lang/tcl/locale-procs.tcl 14 Dec 2003 13:52:39 -0000 1.26 @@ -189,9 +189,17 @@ @author Peter Marklund } { - return [util_memoize [list lang::system::get_locales_not_cached]] + return [util_memoize lang::system::get_locales_not_cached] } +ad_proc -public lang::system::get_locale_options {} { + Return all enabled locales in the system in a format suitable for the options argument of a form. + + @author Lars Pind +} { + return [util_memoize lang::system::get_locale_options_not_cached] +} + ad_proc -public lang::system::locale_set_enabled { {-locale:required} {-enabled_p:required} @@ -207,6 +215,7 @@ # Flush caches util_memoize_flush_regexp {^lang::util::default_locale_from_lang_not_cached} util_memoize_flush_regexp {^lang::system::get_locales} + util_memoize_flush_regexp {^lang::system::get_locale_options} } ad_proc -private lang::system::get_locales_not_cached {} { @@ -221,6 +230,15 @@ }] } +ad_proc -public lang::system::get_locale_options_not_cached {} { + Return all enabled locales in the system in a format suitable for the options argument of a form. + + @author Lars Pind +} { + return [db_list_of_lists select_locales {}] +} + + ##### # # lang::user Index: openacs-4/packages/acs-lang/tcl/locale-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/locale-procs.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-lang/tcl/locale-procs.xql 15 Oct 2003 11:21:53 -0000 1.8 +++ openacs-4/packages/acs-lang/tcl/locale-procs.xql 14 Dec 2003 13:52:39 -0000 1.9 @@ -93,4 +93,13 @@ + + + select label, locale + from ad_locales + where enabled_p = 't' + + + +