Localize Playground

🇺🇸 English

List

Formatted output

red, green, and blue
Localize.List.to_string(
  ["red", "green", "blue"],
  locale: "en", list_style: :standard
)

Items

List style

CLDR provides three list families — standard (conjunctive), or (disjunctive), and unit (measurement) — each in three widths. Pick a style below to see how the join pattern changes.

Pattern for this locale × style

CLDR list patterns use four slots — start, middle, end, and the special two-item pattern for lists of exactly two. `0` and `1` are substituted with list elements.

Start
[0, ", ", 1]
Middle
[0, ", ", 1]
End
[0, ", and ", 1]
Two (special)
[0, " and ", 1]

Examples