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 - 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):
%3 lang::util::default_locale_from_lang lang::util::default_locale_from_lang (public) lang::util::default_locale_from_lang_not_cached lang::util::default_locale_from_lang_not_cached lang::util::default_locale_from_lang->lang::util::default_locale_from_lang_not_cached ad_log ad_log (public) lang::util::default_locale_from_lang_not_cached->ad_log db_list db_list (public) lang::util::default_locale_from_lang_not_cached->db_list

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 $locales
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/lang-util-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: