← ClaudeAtlas

principle-i18nlisted

Internationalization (i18n) & localization (l10n) principles — locale-aware date, time, number, and currency formatting, time-zone correctness (persist UTC in DB, render local), CLDR plural rules, message catalogs (ICU MessageFormat, gettext), translatable string composition (no concatenation), bidirectional & right-to-left layout, character-encoding hygiene, sortable date formats (ISO 8601). Auto-load when adding a new locale, formatting dates/times/numbers/currency for display, persisting timestamps, building message catalogs, composing user-facing strings from variables, designing pluralized copy, working with right-to-left scripts, choosing between backend and frontend locale negotiation, or auditing existing UI strings for translation readiness.
lugassawan/swe-workbench · ★ 2 · Web & Frontend · score 68
Install: claude install-skill lugassawan/swe-workbench
# Internationalization & Localization Principles i18n bugs are latent — they survive review unnoticed and only surface when the product expands to a new locale. ## Locale-Aware Formatting *Use platform APIs that accept a locale tag; never hand-roll date or number rendering.* - Use `Intl.DateTimeFormat(locale, options)` and `Intl.NumberFormat(locale, options)` — not `Date.toString()`, `toLocaleDateString()` without a locale argument, or manual template strings. - Pass BCP 47 locale tags (`en-US`, `fr-FR`, `ar-EG`); rely on CLDR data in the runtime rather than custom format maps. - Never hard-code `MM/DD/YYYY` — format order, separator, and calendar system (Gregorian vs. Hijri vs. Buddhist Era) vary by locale. - Currency: let `Intl.NumberFormat(locale, { style: 'currency', currency: 'USD' })` place the symbol and decide sign position — never concatenate `"$" + amount`. - For backend rendering, thread the `Accept-Language` header or a persisted locale preference down to the formatting layer. ## Time Zones: Persist UTC, Render Local *Timestamps recorded in local time become ambiguous at DST boundaries and when users cross time zones.* - Persist all timestamps as `TIMESTAMP WITH TIME ZONE` in UTC in the database; never persist local time without an offset. - Convert to the user's local zone at the display edge (UI component or API response serialiser), not in business logic or queries. - Account for DST gaps and folds: `America/New_York` can produce two instants for the sam