Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -N -r1.41.2.14 -r1.41.2.15 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 20 Feb 2020 10:15:21 -0000 1.41.2.14 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 20 Feb 2020 11:01:45 -0000 1.41.2.15 @@ -64,6 +64,22 @@ return [lsort -integer $result] } + PackageMgr instproc get_nls_language_from_lang {lang} { + # + # Return the first nls_language matching the provided lang + # prefix. This method is not precise (when e.g. two nls_languages + # are defined with the same lang), but the only thing relevant is + # the lang anyhow. If nothing matches return empty. + # + foreach nls_language [lang::system::get_locales] { + if {[string range $nls_language 0 1] eq $lang} { + return $nls_language + } + } + return "" + } + + PackageMgr instproc import_prototype_page { -package_key:required -name:required Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -N -r1.332.2.47 -r1.332.2.48 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 20 Feb 2020 10:15:22 -0000 1.332.2.47 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 20 Feb 2020 11:01:45 -0000 1.332.2.48 @@ -6,6 +6,8 @@ @cvs-id $Id$ } +::xo::library require -package xotcl-core 06-package-procs + namespace eval ::xowiki { ::xo::PackageMgr create ::xowiki::Package \ @@ -143,19 +145,6 @@ return $locale } - Package proc get_nls_language_from_lang {lang} { - # Return the first nls_language matching the provided lang - # prefix. This method is not precise (when e.g. two nls_languages - # are defined with the same lang), but the only thing relevant is - # the lang anyhow. If nothing matches return empty. - foreach nls_language [lang::system::get_locales] { - if {[string range $nls_language 0 1] eq $lang} { - return $nls_language - } - } - return "" - } - Package instproc default_language {} { #:log "Package ${:instance_name} has default_locale [:default_locale]" return [string range [:default_locale] 0 1]