lang::util::lang_sort (public)

 lang::util::lang_sort field [ locale ]

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

Each locale can have a different alphabetical sort order. You can test this proc with the following data:

    insert into lang_testsort values ('lama');
    insert into lang_testsort values ('lhasa');
    insert into lang_testsort values ('llama');
    insert into lang_testsort values ('lzim');
    

Parameters:
field - Name of Oracle column
locale (optional) - Locale for sorting. If locale is unspecified just return the column name
Returns:
Language aware version of field for Oracle ORDER BY clause.
Author:
Jeff Davis <davis@xarg.net>

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
    # Use west european for english since I think that will fold
    # cedilla etc into reasonable values...
    set lang(en) "XWest_european"
    set lang(de) "XGerman_din"
    set lang(fr) "XFrench"
    set lang(es) "XSpanish"

    if { $locale eq "" || ![info exists lang($locale)] } {
        return $field
    } else {
        return "NLSSORT($field,'NLS_SORT = $lang($locale)')"
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/lang-util-procs.xql

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