lang::util::default_locale_from_lang_not_cached (private)
lang::util::default_locale_from_lang_not_cached language
Defined in packages/acs-lang/tcl/lang-util-procs.tcl
Returns the default locale for a language. Not cached.
- Parameters:
- language (required)
- Name of a language, using a two or three letter ISO code
- Returns:
- Default locale
- Author:
- Henry Minsky <hqm@mit.edu>
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set locales [db_list locales_from_lang { select locale from ad_locales l where language = :language and enabled_p = 't' and (default_p = 't' or not exists (select 1 from ad_locales where language = :language and locale <> l.locale)) }] if {[llength $locales] > 1} { ad_log error "multiple locales '$locales' defined for language '$language'. Define default locale longuage in /acs-lang/admin" set locales [lindex $locales 0] } # # return 0 or 1 locale # return $localesXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-lang/tcl/lang-util-procs.xql