---
id: "packages/active-grid/api/locale-collation"
title: "createLocaleSortFn"
description: "createLocaleSortFn: generated from the source of active-grid."
url: "/packages/active-grid/api/locale-collation"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:locale-collation"
---

# createLocaleSortFn

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## Functions, hooks and constants

**createLocaleSortFn**: `(locale: string, options?: Intl.CollatorOptions) => LocaleRowComparator`

Builds a comparator that orders a column's text in `locale`.

```ts
helper.accessor('name', {sortFn: createLocaleSortFn(readerLocale)})
```

One collator is created per call and shared by every comparison the
returned function makes, so build the comparator once per column set rather
than once per render.
