i18n-localization
Skill1 starsChanged 8 months agoApache-2.0View on GitHub
Internationalize and localize web applications with next-intl, react-intl, ICU MessageFormat, RTL layouts, locale routing, and dynamic locale loading. Use when adding translations or a new language, writing plural or select messages, supporting Hebrew or Arabic RTL, formatting dates, numbers, or currency per locale, or when the user mentions i18n, l10n, next-intl, or locale files.
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Read the file that matches the task before writing code.
- Very specific: line 23
No user-visible string in code: Every label, error, placeholder, aria-label, and page title comes from a message file.
- Very specific: line 24
One message per sentence: Never concatenate fragments or build plurals with a ternary.
- Very specific: line 27
Logical CSS only: Use margin-inline-start, text-align: start, and Tailwind ms-*/pe-*.
- Distinctive: line 30
Load only the active locale: No static imports of every message file.
- Very specific: line 94
Use createNavigation(routing) wrappers (Link, useRouter, usePathname) so links keep the locale.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
i18n-localization
Internationalization (i18n) and localization (l10n) for web applications. Implements proper message formatting, locale routing, RTL support, and dynamic translation loading.
Where to look
| Task | Read |
| next-intl routing, proxy.ts, layouts, locale switcher, loading messages, typed keys | references/next-intl-setup.md |
| ICU plural and select, rich text, dates, numbers, currency | references/icu-and-formatting.md |
| Hebrew, Arabic, or other RTL layouts, logical CSS, Tailwind | references/rtl-layout.md |
Read the file that matches the task before writing code. The core rules below always apply.
Core rules
- No user-visible string in code. Every label, error, placeholder,
aria-label, and page title comes from a message file. - One message per sentence. Never concatenate fragments or build plurals with a ternary. Use ICU
pluralandselect. - Always include the
otherbranch in plural and select messages. - Format with Intl. Dates, numbers, currency, lists, and relative times go through
Intlor the library formatter, nevertoFixedor a hardcoded pattern. - Logical CSS only. Use
margin-inline-start,text-align: start, and Tailwindms-*/pe-*. Neverleftorrightfor layout. - Set
langanddiron<html>from the active locale. Coverhe,ar,fa, anduras RTL. - Validate the locale at the boundary (route segment, cookie, header) against the configured list. Unknown locale means 404 or the default, never a thrown import error.
- Load only the active locale. No static imports of every message file.
- Keep locale files in sync. Same keys and same ICU placeholders in every language. Fail CI when they drift.
- Do not translate by machine and ship unreviewed. Mark machine drafts and have a native speaker review user-facing copy.
Translation file structure
BAD: flat keys, mixed namespaces, layout in the name
{
"welcomeMessage": "Welcome",
"homePageTitle": "Home",
"userProfileName": "Name",
"checkoutButtonSubmit": "Submit Order"
}GOOD: namespaced by feature, nested by meaning
// messages/en/common.json
{ "welcome": "Welcome", "loading": "Loading...", "error": "An error occurred" }
// messages/en/home.json
{ "title": "Home", "hero": { "heading": "Welcome to our platform", "subheading": "Build amazing things" } }
// messages/en/user.json
{ "profile": { "name": "Name", "email": "Email", "updatedAt": "Last updated {date}" } }Name keys for what the text means (checkout.submit), not where it sits or what it says. Keep the source-language file as the reference and the type source.
Plurals in one line
BAD
const message = count === 1 ? `You have ${count} message` : `You have ${count} messages`;GOOD
{ "count": "{count, plural, =0 {No messages} one {# message} other {# messages}}" }More ICU, rich text, and Intl formatting in references/icu-and-formatting.md.
Logical CSS in one line
BAD
.sidebar { float: left; margin-right: 20px; text-align: left; }GOOD
.sidebar { float: inline-start; margin-inline-end: 20px; text-align: start; }Direction handling, icon mirroring, and mixed LTR/RTL text in references/rtl-layout.md.
Next.js 16 with next-intl in one screen
defineRouting({ locales, defaultLocale })insrc/i18n/routing.tsis the single source of locales.src/proxy.tsrunscreateMiddleware(routing). Before Next.js 16 the file ismiddleware.ts.src/i18n/request.tsusesgetRequestConfigand validates the locale withhasLocale.app/[locale]/layout.tsxawaitsparams(a Promise in Next.js 15 and 16), callsnotFound()for bad locales, callssetRequestLocale(locale), and setslanganddir.- Use
createNavigation(routing)wrappers (Link,useRouter,usePathname) so links keep the locale. - Type message keys by augmenting
AppConfiginnext-intl.
Full code in references/next-intl-setup.md.
Review checklist
- No hardcoded visible strings, including
alt,title,placeholder, andaria-label - Plurals and selects use ICU with
other - Dates, numbers, and currency use Intl with an explicit time zone on the server
- No
left,right,ml-*,mr-*,text-leftin layout code langanddirset from the locale; Hebrew and Arabic both coveredhreflangalternates and a locale-aware sitemap for public pages- Every locale has the same keys as the source file
- Locale switcher shows each language in its own name and sets
langon options
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- rikkahub/rikkahub★ 8.6ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- xenitV1/Antigravity-Workflows★ 130same name
- travisjneuman/.claude★ 106same name
- VoDaiLocz/kilo-kit-mcp★ 28same name
- felvieira/claude-skills-fv★ 27same name
- iuliandita/skills★ 10same name
- xfstudio/skills★ 9same name
- SKB3002/agenthub★ 4same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use intelligent-routing, nextjs-react-expert and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SKB3002Skillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 5 projects that use this
SKB3002Skillnextjs-react-expert
React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.
Also in 3 projects that use this
xfstudioSkillrust-pro
Master Rust 1.75+ with modern async patterns, advanced type system
Also in 5 projects that use this
jornalistainclusivoSkilldesign-spec
How to author a DESIGN.md file — the machine-readable design-token + human-rationale format that must exist before any UI is built. YAML front-matter token schema (colors, typography, spacing, rounded, components), type system, token references, and canonical section order.
Also in 3 projects that use this
zzfancitizenSkillverify-changes
Verify code changes do not break the project by running tests, linter checks, and import validation. Use after making any code changes, editing Python files, modifying imports, updating dependencies, or refactoring.
Also in 3 projects that use this
VercelSkillweb-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
Also in 5 projects that use this
In this repository21 other files it gives its agents.
- accessibility-wcagSkill
- api-designSkill
- bugbounty-reportSkill
- ci-cd-pipelinesSkill
- codebase-analysisSkill
- database-designSkill
- design-docSkill
- docker-kubernetesSkill
- git-workflowSkill
- go-devSkill
- llm-integrationSkill
- nextjs-16Skill
- oauth-authSkill
- performance-optimizationSkill
- python-best-practicesSkill
- scraping-automationSkill
- security-reviewSkill
- seo-metaSkill
- tailwind-cssSkill
- testingSkill
- ts-devSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

