Localize Playground

🇺🇸 English

Locale & collation

Sorted result

Localize.Collation.sort(words, locale: "en")
  1. apple
  2. Apple
  3. banana
  4. Banana
  5. cafe
  6. Cafe
  7. café
  8. resume
  9. résumé
  10. zebra
Pairwise compare
<

Quick presets

One-click combinations of the options below. They replace any current overrides.

Collation options

Each option here is applied on top of the locale's built-in tailoring. Leave a select on its default to let the locale decide.

Strength How fine-grained the comparison is. Higher strength distinguishes more differences (case, accents).
Alternate Whether punctuation and whitespace carry weight. `Shifted` pushes them to the last level.
Case first When strength ≥ tertiary, whether uppercase or lowercase sorts first.
Max variable Which classes of characters are treated as variable-weight when alternate = shifted.
Case level Inserts a dedicated case comparison level. Lets primary strength still distinguish case.
Backwards secondary (French) Reverses the secondary level — the classic French accent rule.
NFD normalization Canonicalize input before comparing. Usually only needed for unusual source data.
Numeric mode Treat digit runs as numbers (so `item2` sorts before `item10`).

Reorder codes (-u-kr)

Reorder groups of scripts relative to each other. Earlier entries sort first; anything not listed keeps its default position. Example: add Cyrl then Latn to make Cyrillic sort before Latin.

Word list

💡 Standard English mixes case and accented forms — try strength = primary to collapse them.

One word per line. Changing the language swaps in a fresh seed list; your edits are kept otherwise.