lang::conn::language (public)

 lang::conn::language [ -package_id package_id ] [ -user_id user_id ] \
    [ -site_wide ] [ -iso6392 ] [ -locale locale ]

Defined in packages/acs-lang/tcl/locale-procs.tcl

Get the language for this request, perhaps for a given package instance.

Switches:
-package_id
(optional)
The package for which you want to get the language (used only when, no locale is provided).
-user_id
(optional)
The user_id for whom you want to get the language (used only when, no locale is provided).
-site_wide
(boolean) (optional)
Set this if you want to get the site-wide language (used only when, no locale is provided).
-iso6392
(boolean) (optional)
Set this if you want to force the iso-639-2 code
-locale
(optional)
obtain language from provided locale
Returns:
3 chars language code if iso6392 is set, left part of locale otherwise

Partial Call Graph (max 5 caller/called nodes):
%3 test_test_get_locales test_get_locales (test acs-lang) lang::conn::language lang::conn::language test_test_get_locales->lang::conn::language lang::conn::locale lang::conn::locale (public) lang::conn::language->lang::conn::locale lang::util::iso6392_from_language lang::util::iso6392_from_language (public) lang::conn::language->lang::util::iso6392_from_language richtext::ckeditor4::initialize_widget richtext::ckeditor4::initialize_widget (public) richtext::ckeditor4::initialize_widget->lang::conn::language richtext::ckeditor5::initialize_widget richtext::ckeditor5::initialize_widget (public) richtext::ckeditor5::initialize_widget->lang::conn::language richtext::xinha::initialize_widget richtext::xinha::initialize_widget (public) richtext::xinha::initialize_widget->lang::conn::language

Testcases:
test_get_locales
Source code:
    if {$locale eq ""} {
        set locale [locale -package_id $package_id -user_id $user_id -site_wide=$site_wide_p]
    }
    set conn_lang [lindex [split $locale "_"] 0]

    if { $iso6392_p } {
        return [lang::util::iso6392_from_language -language $conn_lang]
    } else {
        return $conn_lang
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/locale-procs.xql

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