loom-i18n
Installation
SKILL.md
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
-
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.
// 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}}"