frontend-internationalization-best-practices

frontend-internationalization-best-practices is a skill for Claude Code, Codex from sergiodxa/agent-skills. It costs 39 tokens per session (828 once invoked), scanned A, original, MIT.

A set of guidelines for adding multiple languages to React Router applications with remix-i18next, a library for translating React apps.

In plain words
What is it for?
Use it when setting up supported languages, middleware, translated resource routes, or type-safe translation files.
Why use it?
It helps avoid inconsistent locale detection, storage, server rendering, and language switching.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when setting up supported languages, middleware, translated resource routes, or type-safe translation files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sergiodxa/agent-skills/frontend-internationalization-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sergiodxa/agent-skills --skill frontend-internationalization-best-practices
Clone the repo
git clone --depth 1 https://github.com/sergiodxa/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frontend-internationalization-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/sergiodxa/agent-skills/frontend-internationalization-best-practices/github.svg)](https://agentmods.dev/skills/sergiodxa/agent-skills/frontend-internationalization-best-practices)
Your own site
<a href="https://agentmods.dev/skills/sergiodxa/agent-skills/frontend-internationalization-best-practices"><img src="https://agentmods.dev/badge/skills/sergiodxa/agent-skills/frontend-internationalization-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frontend-internationalization-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/sergiodxa/agent-skills/frontend-internationalization-best-practices"><img src="https://agentmods.dev/badge/skills/sergiodxa/agent-skills/frontend-internationalization-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 828 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00828
Opus 5 $0.00019 $0.00414
Sonnet 5 $0.00008 $0.00166
Haiku 4.5 $0.00004 $0.00083

Measured 11d ago against content hash 1d8cc0034ce6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

frontend-internationalization-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/frontend-internationalization-best-practices/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Internationalization Best Practices

Guidelines for building a React Router i18n setup with remix-i18next. Focuses on middleware detection, locale storage, type safety, and client/server synchronization.

When to Apply

  • Adding i18n to a React Router app
  • Wiring remix-i18next middleware
  • Implementing language switching or locale detection
  • Serving locale resources from /api/locales

Rules Summary

Setup & Middleware (CRITICAL)

setup-middleware - @rules/setup-middleware.md

Configure createI18nextMiddleware and type-safe resources.

export const [i18nextMiddleware, getLocale, getInstance] =
  createI18nextMiddleware({
    detection: {
      supportedLanguages: ["es", "en"],
      fallbackLanguage: "en",
      cookie: localeCookie,
    },
    i18next: { resources },
    plugins: [initReactI18next],
  });
locales-structure - @rules/locales-structure.md

Define locale resources per language and re-export.

// app/locales/en/translation.ts
export default { title: "Example" };

Namespaces (HIGH)

namespaces-strategy - @rules/namespaces-strategy.md

Use a single namespace for small apps; multiple namespaces for large apps.

// Large app: common + route namespaces
export default { common, home, notFound };

Locale Detection & Persistence (CRITICAL)

locale-detection - @rules/locale-detection.md

Prefer cookie/session for speed, with DB as source of truth.

export const [i18nextMiddleware, getLocale] = createI18nextMiddleware({
  detection: { cookie: localeCookie, fallbackLanguage: "en" },
});
language-switcher - @rules/language-switcher.md

Store locale in cookie/session and keep it in sync.

return data(
  { locale },
  { headers: { "Set-Cookie": await localeCookie.serialize(locale) } },
);

Client & Server Integration (CRITICAL)

root-locale-sync - @rules/root-locale-sync.md

Send locale to the UI and sync <html lang dir>.

export async function loader({ context }: Route.LoaderArgs) {
  let locale = getLocale(context);
  return data(
    { locale },
    { headers: { "Set-Cookie": await localeCookie.serialize(locale) } },
  );
}

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 140 lines · 39 tokens per session scan A 1d8cc0034ce6

Subscribe to this mod's changes

frontend-internationalization-best-practices is a skill published in the GitHub repository sergiodxa/agent-skills (90 stars, last pushed 7mo ago), licensed MIT. It adds 39 tokens to every session and 828 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

json-ui

CRITICAL: Use for json-ui component rendering and development. Triggers on: json-ui, json render, component catalog, report render, HTML report, I18nString, i18n, bilingual, language switch, dual language, PaperHeader, AuthorList, Abstract, MetricsGrid, Section, Highlight, Zod schema, catalog.ts, cli.ts…

actionbook/actionbook · 118 tokens

experience-ui-bundle-localize

MUST activate to localize / internationalize a uiBundles//src/ project (React or Angular): extract hardcoded user-facing strings into Custom Labels, wire a runtime i18n library over the Platform SDK backend, add labels for another language, or troubleshoot label rendering across locales. Triggers: user-facing string…

forcedotcom/sf-skills · 225 tokens

ss-motion

Apply a named StyleSeed motion to a component — either one of the 5 personality seeds (Spring/Silk/Snap/Float/Pulse × entrance/exit/hover/press/layout) or a distinctive keyword move from the motion library (toggle-flip, toggle-curtain, reveal-blur, pop-in, shimmer, …). Translates vibe words into framer-motion code…

bitjaru/styleseed · 85 tokens

extract-source-sample

Given the path to a finished content-goose ad-run folder, extract everything that defines that ad — recipe shot list, VO script, characters, voices, world, atom-skills, master mp4 — and emit a source-sample.json in the exact shape the upload-ad-sample skill writes to the Goose Ads library. Also links every character…

gooseworks-ai/goose-skills · 160 tokens

i18n

Add full internationalization (i18n) to a Next.js project using next-intl. Supports 14+ languages, SEO-friendly locale routing, hreflang sitemaps, and bulk translation. Use when the user asks to "internationalize", "add i18n", "add translations", "multi-language", "localize", "add language support", or "translate my…

OpenClaudia/openclaudia-skills · 84 tokens

i18n-date-patterns

Implements internationalization (i18n) in React applications. Covers user-facing strings, date/time handling, locale-aware formatting, ICU MessageFormat, and RTL support. Use when building multilingual UIs or formatting dates/currency.

yonatangross/orchestkit · 53 tokens