aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/utils/sorting.ts
blob: 88f877733ccc3059d8027b0880528119f1cc7f87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

import { getCanonicalLocale, getLanguage } from '@nextcloud/l10n'

export const naturalCollator = Intl.Collator(
	[getLanguage(), getCanonicalLocale()],
	{
		numeric: true,
		usage: 'sort',
	},
)