All docs
V24.2
24.2
24.1
23.2
23.1
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

DevExtreme jQuery - DataSource - langParams

Specifies parameters for language-specific sorting and filtering.

Type:

LangParams

Use this property to include language-specific parameters in sorting and filtering operations performed on a client. For example, you can use langParams to make DataSource ignore letters with diacritic symbols. Specify locale and collator options as in the example below:

jQuery
JavaScript
const dataSource = new DevExpress.data.DataSource({
    // ...
    langParams: {
        locale: 'fr',
        collatorOptions: {
            sensitivity: 'accent',
            caseFirst: 'upper'
        }
    }
});
Angular
TypeScript
import DataSource from "devextreme/data/data_source";
// ...
export class AppComponent {
    dataSource: DataSource;
    constructor () {
        this.dataSource = new DataSource({
            // ...
            langParams: {
                locale: 'fr',
                collatorOptions: {
                    sensitivity: 'accent',
                    caseFirst: 'upper'
                }
            }
        });
    }
}
Vue
App.vue
<script>
import DataSource from 'devextreme/data/data_source';

const dataSource = new DataSource({
    // ...
    langParams: {
        locale: 'fr',
        collatorOptions: {
            sensitivity: 'accent',
            caseFirst: 'upper'
        }
    }
});

export default {
    data() {
        return {
            dataSource
        }
    }
}
</script>
React
App.js
// ...
import DataSource from 'devextreme/data/data_source';

const dataSource = new DataSource({
    // ...
    langParams: {
        locale: 'fr',
        collatorOptions: {
            sensitivity: 'accent',
            caseFirst: 'upper'
        }
    }
});

function App() {
    // ...
}
export default App;

collatorOptions

Specifies Intl.Collator options.

Type:

Object

NOTE
If you set sensitivity: 'base', all diacritics are ignored while sorting and filtering.

locale

Specifies the locale whose features affect sorting and filtering.

Type:

String

Refer to the following page to see the list of available locales: IANA Language Subtag Registry.