loom-i18n

Solid

Internationalization and localization patterns for multi-language applications. Use when implementing translation systems, locale-specific formatting (dates, numbers, currency), RTL layouts, pluralization, or language switching with libraries like i18next, react-intl, FormatJS, or gettext.

Web & Frontend 53 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Internationalization (i18n) ## Overview Designing software to adapt to languages/regions without code changes (i18n), then adapting it per-locale (l10n). Covers translation architecture, ICU pluralization, `Intl`-based formatting, RTL/bidi, and libraries (i18next, react-intl/FormatJS, gettext). ## The Rules That Prevent Rework 1. **Never concatenate translated fragments.** Word order, gender agreement, and grammar differ per language. Use one full-sentence key with named placeholders; the translator controls order. ```javascript // Wrong — impossible to translate; order is baked into code t("You have") + " " + count + " " + t("new messages"); // Right — one message, interpolation + plural inside it t("inbox.newMessages", { count }); // "{count, plural, one {# new message} other {# new messages}}" ``` 2. **Pluralize with CLDR categories, never `if (count === 1)`.** English has 2 forms; Russian/Polish 3–4; Arabic 6 (`zero one two few many other`). Which categories a language uses is defined by CLDR — use ICU MessageFormat / `Intl.PluralRules`, not hand-rolled logic. 3. **Format with `Intl`, never by hand.** Decimal/grouping separators, currency placement, date order, and calendars are locale data you will get wrong manually (`1,234.56` en-US vs `1.234,56` de-DE vs `1 234,56` fr-FR). 4. **A locale is language + region.** `en-US` vs `en-GB`: `12/25/2024` vs `25/12/2024`, `color` vs `colour`, different currency. Store and resolve full BCP-47 tags; fall ba...

Details

Author
cosmix
Repository
cosmix/loom
Created
8 months ago
Last Updated
today
Language
Rust
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

i18n

Internationalize and localize software — externalized message catalogs, ICU MessageFormat for plurals/gender/select, locale-aware formatting of dates/numbers/currency, RTL/bidi layout, Unicode correctness, content negotiation, and the translation pipeline. Use when extracting hardcoded UI strings, choosing an i18n library (react-i18next/FormatJS/next-intl/vue-i18n/gettext), handling plural rules across languages, formatting per-locale dates/currency, supporting RTL scripts, designing the locale-resolution chain, or wiring a translation workflow. Boundary vs a11y and frontend-fundamentals — a11y owns assistive-tech access (semantics, screen readers, keyboard, contrast) and frontend-fundamentals owns generic UI state/structure; this skill owns the language-and-locale dimension — message catalogs, pluralization/grammar, locale-aware formatting, bidi/RTL, and Unicode handling — concerns that exist even for a fully accessible single-language UI. Defers per-locale visual tokens to frontend-design.

5 Updated today
kouroshez
Code & Development Listed

i18n-rtl

Build UI that survives translation and bidirectional text — no concatenated strings, no hardcoded formats, logical CSS properties, and layouts that tolerate 40% longer words. Load when the app is or may become multilingual.

1 Updated 3 weeks ago
soumit-kaz
Web & Frontend Listed

i18n-and-localization

Internationalize and localize user-facing strings — message extraction, ICU MessageFormat pluralization, RTL layout, and date/number formatting. Use when adding user-facing strings, adding a new locale, or building a component that must lay out correctly in a right-to-left language. Triggers on i18n, l10n, localization, translation, pluralization, RTL, locale, date formatting, number formatting.

0 Updated 3 weeks ago
BenMacDeezy