lang::conn::locale_not_cached (private)
lang::conn::locale_not_cached [ -package_id package_id ] \ [ -site_wide ] [ -user_id user_id ]
Defined in packages/acs-lang/tcl/locale-procs.tcl
Get the locale for this request, perhaps for a given package instance. This is the not-cached version.
- Switches:
- -package_id (optional)
- The package for which you want to get the locale.
- -site_wide (optional, boolean)
- Set this if you want to get the site-wide locale.
- -user_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if { $site_wide_p } { set locale [lang::user::site_wide_locale] if { $locale eq "" } { set locale [lang::system::site_wide_locale] } # # Fallback to en_US when no locale is found or is not one of # those we support. # if { $locale eq "" || $locale ni [lang::system::get_locales]} { set locale en_US } return $locale } # default value for package_id if { $package_id eq "" } { set package_id [ad_conn package_id] } # use user's package level locale set locale [lang::user::package_level_locale -user_id $user_id $package_id] # if that does not exist use system's package level locale if { $locale eq "" } { set locale [lang::system::package_level_locale $package_id] } # if that does not exist use user's site-wide locale if { $locale eq "" } { set locale [lang::user::site_wide_locale -user_id $user_id] } # Use the accept-language browser heading if { $locale eq "" && [ns_conn isconnected]} { set locale [lang::conn::browser_locale] } # if that does not exist use system's site-wide locale if { $locale eq "" } { set locale [lang::system::site_wide_locale] } # if that does not exist, or is not supported, then we are back to # just another language let's pick uhmm... en_US if { $locale eq "" || $locale ni [lang::system::get_locales]} { set locale en_US } return $localeXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-lang/tcl/locale-procs.xql