lang::system::set_locale (public)

 lang::system::set_locale [ -package_id package_id ] locale

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

Set system locale setting for a given package instance, or the site-wide system locale.

Switches:
-package_id (optional)
The package for which you want to set the locale setting, if you want to set system setting for one package only. Leave blank for site-wide setting.
Parameters:
locale (required)
The new locale that you want to use as your system locale.

Partial Call Graph (max 5 caller/called nodes):
%3 test_dt_localized_procs dt_localized_procs (test acs-datetime) lang::system::set_locale lang::system::set_locale test_dt_localized_procs->lang::system::set_locale test_link_tests link_tests (test xowiki) test_link_tests->lang::system::set_locale test_locale__test_system_package_setting locale__test_system_package_setting (test acs-lang) test_locale__test_system_package_setting->lang::system::set_locale test_path_resolve path_resolve (test xowiki) test_path_resolve->lang::system::set_locale test_slot_interactions slot_interactions (test xowiki) test_slot_interactions->lang::system::set_locale apm_package_id_from_key apm_package_id_from_key (public) lang::system::set_locale->apm_package_id_from_key db_dml db_dml (public) lang::system::set_locale->db_dml parameter::set_value parameter::set_value (public) lang::system::set_locale->parameter::set_value util_memoize_flush util_memoize_flush (public) lang::system::set_locale->util_memoize_flush install::xml::action::set-system-locale install::xml::action::set-system-locale (private) install::xml::action::set-system-locale->lang::system::set_locale

Testcases:
dt_localized_procs, locale__test_system_package_setting, test_get_locales, link_tests, slot_interactions, path_resolve
Source code:
    if { $package_id eq "" } {

        parameter::set_value  -package_id [apm_package_id_from_key "acs-lang"]  -parameter SiteWideLocale  -value $locale

    } else {
        # Update the setting
        db_dml update_system_locale {}

        # Flush the cache
        util_memoize_flush [list lang::system::package_level_locale_not_cached $package_id]

        # TODO: We will need to have site-map inheritance for this, so packages under a subsite/dotlrn inherit the subsite's/dotlrn's setting
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
<fullquery name="lang::system::set_locale.update_system_locale">
    <querytext>
        update apm_packages
        set    default_locale = :locale 
        where  package_id = :package_id
      </querytext>
</fullquery>
packages/acs-lang/tcl/locale-procs.xql

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