Перейти к основному содержимому

Formatting & CLDR plural correctness

Generated from pattern-library/registry.json — do not edit by hand; change the registry and run bun run patterns:build.

Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.

Category: Internationalization (i18n) · Tier: light · Maturity: proven (verified 2026-08-20 @ 1a130d67) · Risk: low — presentation formatting only

Locale-explicit date, number, currency, percent, and relative-time formatting helpers built on the native Intl API, decoupled from the translation locale to avoid SSR/CSR hydration mismatches.

When to use: Use whenever displaying a date, number, currency, or relative-time value that should format per the visitor's locale.

Docs

Code

Tests

  • src/lib/i18n/plurals.test.ts — CLDR plural-category correctness across locales (GitHub · GitLab)

Proof


Machine-readable record: i18n-formatting in pattern-library/registry.json.

← Back to Pattern Library

Думаете, этот паттерн можно сделать лучше? Расскажите как.

Оставить отзыв