lang::user::site_wide_locale_not_cached (private)
lang::user::site_wide_locale_not_cached user_id
Defined in packages/acs-lang/tcl/locale-procs.tcl
Get the user's preferred site-wide locale.
- Parameters:
- user_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set system_locale [lang::system::site_wide_locale] if { $user_id == 0 } { set cookie_name [security::cookie_name locale] set locale [ad_get_cookie $cookie_name] if {$locale ne ""} { # # Check, if someone hacked the cookie # if {$locale ni [lang::system::get_locales]} { ns_log warning "ignoring invalid ad_locale cookie '$locale'" set locale "" # # The cookie was invalid, so get rid of it. # ad_unset_cookie $cookie_name } } } else { set locale [db_string get_user_site_wide_locale {} -default ""] } # # When no locale cookie is set, or the locale is invalid or empty, # fall back to system locale. # if { $locale eq "" } { set locale $system_locale } return $localeXQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="lang::user::site_wide_locale_not_cached.get_user_site_wide_locale"> <querytext> select locale from user_preferences where user_id = :user_id </querytext> </fullquery>packages/acs-lang/tcl/locale-procs.xql