Skip to content
Agentmart
Submit a tool

i18n

i18n/l10n — locale detection, translations, pluralization, RTL.

Skill by Dev-Toolbelt

IndexedMIT★ 7
Write a review

Chalk Labs

Need help deploying i18n?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dev-toolbelt-i18n

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

i18n/l10n — locale detection, translations, pluralization, RTL.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/i18n

What's inside

Skill name
i18n
Description
i18n/l10n — locale detection, translations, pluralization, RTL.
License
MIT
Instructions
110 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## Locale Detection Order

Resolve the active locale by checking sources in this priority order:

1. URL prefix (`/fr/checkout`, `/en-US/dashboard`)
2. Query parameter (`?lang=fr`)
3. `Accept-Language` HTTP header (parse quality values, e.g., `fr-CH, fr;q=0.9, en;q=0.8`)
4. Stored user preference (DB or cookie)
5. Default locale (configured at app level, e.g., `en`)

Always persist a resolved locale to the user profile once they are authenticated so subsequent sessions skip header parsing.

## Translation File Structure

Organize one file per locale per domain. Never put all keys in a single monolithic file.

```
locales/
  en/
    auth.json
    checkout.json
    common.json
    errors.json
  fr/
    auth.json
    checkout.json
    ...
```

- Load only the domains needed for the current page
- Use lazy loading for large locale bundles (import on route change)
- Commit all locale files together — never merge a feature without all locale files updated

## Key Naming Conventions

- Use flat dot-notation: `user.welcome_message`, `checkout.order_summary_title`
- Keys must be descriptive, not positional: `form.submit_button` not `label_4`
- Use snake_case for key segments
- Namespace by feature/domain prefix: `auth.`, `billing.`, `common.`
- Never reuse a key across contexts with different meanings

## Pluralization

- Use ICU Message Format or the framework's built-in plural rules (i18next, react-intl, formatjs, vue-i18n)
- Never concatenate strings to build plural sentences:

```
// Wrong
`You have ${count} ${count === 1 ? 'item' : 'items'}`

// Correct — ICU format
"cart.item_count": "{count, plural, one {# item} other {# items}}"
```

- Handle zero as a distinct plural category when the UX calls for it (`zero {No items}`)
- Languages have 2–6 plural forms; always defer to CLDR rules, not assumptions

## Date and Number Formatting

- Always use `Intl.DateTimeFormat` and `Intl.NumberFormat` — never manual string building
- Pass the active locale and relevant options:

```js
new Intl.DateTimeFormat('fr-FR', { dateStyle: 'long' }).format(date)
new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(amount)
```

- Never hardcode month names, AM/PM, decimal separators, or thousands separators
- Store all timestamps as ISO 8601 UTC in the backend; format for the user's locale on the frontend

## Currency Handling

- Store monetary amounts as integers (cents / minor units): `1999` for $19.99
- Never store amounts as floats — floating-point arithmetic introduces rounding errors
- Always store the currency code alongside the amount: `{ amount: 1999, currency: "USD" }`
- Format for display only; use `Intl.NumberFormat` with `style: 'currency'`
- Display the currency code (`USD`) alongside the symbol (`$`) for international audiences to avoid ambiguity

## RTL (Right-to-Left) Support

- Use CSS logical properties throughout — never directional properties:

| Avoid | Use instead |
|-------|------------|
| `margin-left` | `margin-inline-start` |
| `padding-right` | `padding-inline-end` |
| `text-align: left` | `text-align: start` |
| `border-left` | `border-inline-start` |
| `float: left` | `float: inline-start` |

- Set `dir="rtl"` on the `<html>` element for RTL locales
- Test layouts in Arabic (`ar`) and Hebrew (`he`) — mirroring is often imperfect without explicit testing
- Icons with directional meaning (arrows, chevrons) must be flipped in RTL

## Missing Key Fallback

- Fall through to the default locale when a key is missing in the active locale
- Log missing keys to the console in development; send to a monitoring service in production
- Never render raw key strings to end users (e.g., `"checkout.submit_button"`)
- Track translation coverage per locale; block merges when coverage drops below a threshold (e.g., 95%)

## Backend Responsibilities

- Store the user's locale preference in the database (`user.locale`)
- Return all dates and timestamps as ISO 8601 UTC strings (`2026-05-10T14:30:00Z`)
- Return currency amounts as integers with an explicit currency code
- Never format dates or numbers for a specific locale in API responses — let the frontend handle formatting
- Accept `Accept-Language` on all API endpoints for locale-sensitive responses (e.g., localized product names)

From Dev-Toolbelt/dev-team-agents, MIT.

More from Dev-Toolbelt/dev-team-agents

Signals

Stars
7
Forks
0
Open issues
0
Last commit (this folder)
Oct 18, 2026 (13 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Dev-Toolbelt

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get i18n running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying i18n?

CallGet help
Cite this page

i18n skill. Agent Mart. https://agentmart.dev/skills/dev-toolbelt-i18n (last updated 2026-10-24)