Add full internationalization (i18n) to a Next.js project using next-intl.

MITAuto-check passedFrontend & Design

Install I18n

skills CLI
$ npx skills add OpenClaudia/openclaudia-skills --skill i18n -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenClaudia/openclaudia-skills i18n --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/i18n .claude/skills/i18n && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
i18n
GitHub stars
713
Token cost
~2.3k tokens
SKILL.md length
631 words
Files
1
Skills in repo
74
Repo updated
First seen
Licence
MIT

At a glance

Add full internationalization (i18n) to a Next.js project using next-intl.

  • Works in 11 steps: Assess the Project → Install Dependencies → Create i18n Configuration Files → …
  • The user asks to internationalize
  • SKILL.md covers Step 1: Assess the Project, Step 2: Install Dependencies, Step 3: Create i18n… and Step 4: Create Middleware, plus 9 more sections
  • Calls npm and git

What it does

I18n is an agent skill from OpenClaudia/openclaudia-skills. 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 site".

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Internationalization, Translation and Technical SEO. It works with Next.js. The repository describes itself as: 77 open-source marketing skills for Claude Code, Codex, and other AI coding agents. SEO, content, email, ads, analytics, and growth. The licence is MIT.

When your agent uses it

  • The user asks to internationalize
  • Add translations
  • Add language support
  • Translate my site

Example prompts

  • “internationalize”
  • “add i18n”
  • “add translations”
  • “/i18n”

Requirements

  • Python 3
  • Node.js

Workflow steps

11 steps, taken from the step headings in SKILL.md.

  1. Assess the Project
  2. Install Dependencies
  3. Create i18n Configuration Files
  4. Create Middleware
  5. Update next.config
  6. Add [locale] Dynamic Route
  7. Extract Strings into Translation Files
  8. Translate to All Locales
  9. Update Sitemap with Hreflang
  10. Add Language Selector (Optional)
  11. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 28bf209. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

I18n loads about 2.3k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 631 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenClaudia/openclaudia-skills at commit 28bf209, republished under its MIT licence (© OpenClaudia). 631 words, ~2,340 tokens.

Download SKILL.mdSave it as .claude/skills/i18n/SKILL.md (or your agent's skills folder).
name
i18n
description
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 site".
user_invocable
true

Internationalize a Next.js Project

Add complete internationalization to a Next.js (App Router) project using next-intl v4. This skill handles routing, translation files, sitemap hreflang, and bulk translation across all locales.

Step 1: Assess the Project

  1. Check the Next.js version (package.json) — must be 13+ with App Router
  2. Check if i18n is already partially set up (look for next-intl, next-i18next, [locale] routes)
  3. Identify all pages/routes that need translation
  4. Identify all user-facing strings (hardcoded text in components)
  5. Ask the user which locales to support (default recommendation: en, es, fr, de, pt, ja, ar, zh, zh-tw, id, vi, ms, ru, hi)

Step 2: Install Dependencies

bash
npm install next-intl

Step 3: Create i18n Configuration Files

Create 4 files under src/i18n/:

src/i18n/config.ts
typescript
export const locales = ['en', 'es', 'fr', 'de', 'pt', 'ja', 'ar', 'zh', 'zh-tw', 'id', 'vi', 'ms', 'ru', 'hi'] as const

export type Locale = (typeof locales)[number]
export const defaultLocale: Locale = 'en'

export const localeNames: Record<Locale, string> = {
  en: 'English',
  es: 'Espanol',
  fr: 'Francais',
  de: 'Deutsch',
  pt: 'Portugues',
  ja: '日本語',
  ar: 'العربية',
  zh: '简体中文',
  'zh-tw': '繁體中文',
  id: 'Bahasa Indonesia',
  vi: 'Tieng Viet',
  ms: 'Bahasa Melayu',
  ru: 'Русский',
  hi: 'हिन्दी',
}

export const rtlLocales: Locale[] = ['ar']
src/i18n/routing.ts
typescript
import { defineRouting } from 'next-intl/routing'
import { defaultLocale, locales } from './config'

export const routing = defineRouting({
  locales,
  defaultLocale,
  localePrefix: 'as-needed', // English URLs stay clean, other locales get /es/, /fr/, etc.
})
src/i18n/navigation.ts
typescript
import { createNavigation } from 'next-intl/navigation'
import { routing } from './routing'

export const { Link, redirect, usePathname, useRouter } = createNavigation(routing)
src/i18n/request.ts
typescript
import { getRequestConfig } from 'next-intl/server'
import { routing } from './routing'

export default getRequestConfig(async ({ requestLocale }) => {
  let locale = await requestLocale
  if (!locale || !routing.locales.includes(locale as any)) {
    locale = routing.defaultLocale
  }
  return {
    locale,
    messages: (await import(`../messages/${locale}.json`)).default,
  }
})

Step 4: Create Middleware

Create src/middleware.ts:

typescript
import createMiddleware from 'next-intl/middleware'
import { routing } from '@/i18n/routing'

export default createMiddleware({
  ...routing,
  localeDetection: false, // Don't auto-redirect based on Accept-Language
})

export const config = {
  matcher: ['/((?!_next|api|images|fonts|favicon|sitemap|robots).*)'],
}

Key decision: localeDetection: false prevents auto-redirecting users based on browser language. This keeps English URLs stable for SEO. Users can manually switch languages via a language selector.

Step 5: Update next.config

Wrap the existing config with createNextIntlPlugin:

typescript
import createNextIntlPlugin from 'next-intl/plugin'
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts')

// ... existing config ...
export default withNextIntl(nextConfig)

Step 6: Add [locale] Dynamic Route

Move all page content under src/app/[locale]/:

  1. Create src/app/[locale]/layout.tsx with:

    • generateStaticParams() returning all locales
    • setRequestLocale(locale) call
    • <NextIntlClientProvider> wrapping children
    • <html lang={locale} dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>
    • Hreflang <link> tags in <head> for all locales + x-default
  2. Move existing pages into src/app/[locale]/

  3. Each page should call setRequestLocale(locale) for static generation

Step 7: Extract Strings into Translation Files

  1. Create src/messages/en.json with all user-facing strings organized by section:

    json
    {
      "common": { "signIn": "Sign In", ... },
      "tools": { "tool-slug": { "title": "...", "description": "..." } },
      "faq": { "tool-slug": [{ "question": "...", "answer": "..." }] }
    }
  2. Replace all hardcoded strings in components with useTranslations():

    typescript
    const t = useTranslations('common')
    return <button>{t('signIn')}</button>
  3. For server components, use getTranslations():

    typescript
    const t = await getTranslations('common')

Step 8: Translate to All Locales

For each non-English locale, create src/messages/{locale}.json with the same structure as en.json.

Translation Strategy

Use parallel Codex agents via the codex-tasks skill to save Claude credits:

  1. Launch one Codex task per locale (up to 7 in parallel) using /codex-tasks
  2. Each task reads en.json, translates all strings, writes {locale}.json
  3. Codex prompt should include:
    • The full en.json content (or path to read it)
    • Target language name and locale code
    • Instructions:
      • Translate naturally, not literally
      • Keep technical terms in English (PowerPoint, PDF, API, etc.)
      • Preserve JSON structure exactly (same keys, same nesting)
      • Preserve interpolation variables like {count}, {name} unchanged
      • Write the result to src/messages/{locale}.json
  4. After Codex tasks complete, verify the results using the verification script below — Codex output quality varies and must be checked
Show full SKILL.md (250 more words)Show less
Verification

After translation, run a verification script to catch issues:

python
import json

locales = ['es', 'fr', 'de', 'pt', 'ja', 'ar', 'zh', 'zh-tw', 'id', 'vi', 'ms', 'ru', 'hi']
english_words = ['the ', 'and ', 'you ', 'your ', 'our ', 'this ', 'that ', 'with ', 'from ', 'will ']

with open('src/messages/en.json') as f:
    en = json.load(f)

for loc in locales:
    with open(f'src/messages/{loc}.json') as f:
        data = json.load(f)

    # Check: missing sections
    missing = [s for s in en if s not in data]

    # Check: residual English content
    eng_count = 0
    def check(d):
        nonlocal eng_count  # won't work in inline script; use list trick
        if isinstance(d, dict):
            for v in d.values(): check(v)
        elif isinstance(d, str):
            if sum(1 for w in english_words if w in d.lower()) >= 3:
                eng_count += 1
    check(data)

    status = 'OK' if not missing and eng_count == 0 else 'ISSUES'
    print(f'{loc}: {status} (missing={len(missing)}, english={eng_count})')

Step 9: Update Sitemap with Hreflang

Update src/app/sitemap.ts to include hreflang alternates:

typescript
import { MetadataRoute } from 'next'
import { locales } from '@/i18n/config'

const baseUrl = 'https://www.example.com'

function buildAlternates(path: string): Record<string, string> {
  const alternates: Record<string, string> = {}
  for (const locale of locales) {
    const prefix = locale === 'en' ? '' : `/${locale}`
    alternates[locale] = `${baseUrl}${prefix}${path}`
  }
  return alternates
}

export default function sitemap(): MetadataRoute.Sitemap {
  return pages.map((path) => ({
    url: `${baseUrl}${path}`,
    lastModified: new Date(),
    alternates: { languages: buildAlternates(path) },
  }))
}

Important: Generate one canonical URL per page with hreflang alternates, NOT one URL per locale. This prevents duplicate content in search results.

Step 10: Add Language Selector (Optional)

Add a language switcher component that uses useRouter and usePathname from @/i18n/navigation to switch locales while preserving the current path.

Step 11: Verify

  1. Build the project: npm run build — check that all static pages generate correctly
  2. Test English URLs have no prefix: https://example.com/tools
  3. Test locale URLs have prefix: https://example.com/es/tools
  4. Verify sitemap has hreflang alternates
  5. Check RTL rendering for Arabic
  6. Run the translation verification script from Step 8

Common Pitfalls

  • public/sitemap.xml conflicts with dynamic src/app/sitemap.ts in dev mode — delete the static one or rename it
  • Middleware matcher must exclude _next, api, sitemap, robots, and static asset paths
  • localePrefix: 'as-needed' is critical — it keeps default locale URLs clean for SEO continuity
  • localeDetection: false prevents unwanted redirects that break SEO and confuse users
  • Large translation files (5000+ lines per locale) can make git pushes fail — use git config http.postBuffer 524288000
  • Verify translations thoroughly — automated translation often produces mixed-language output; always verify with the English word detection script after Codex tasks complete

Locale Count Reference

  • 14 locales x N pages = 14N static pages at build time
  • Each locale JSON file is typically 2-5x the size of en.json (CJK characters, verbose languages)
  • Build time increases linearly with locale count

© OpenClaudia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/i18n of OpenClaudia/openclaudia-skills.

Open the folder on GitHubat commit 28bf209

Compare with similar skills

I18n next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

I18n compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
I18n this skillOpenClaudia/openclaudia-skills713—~2.3kAutomated safety check: PassMIT
Internationalizing Websitesaiskillstore/marketplace4302 repos~2kAutomated safety check: PassNone
Readme I18nY80/bmm3442 repos~1.9kAutomated safety check: PassMIT
Builder UI I18nChatbotXIO/ChatbotX881—~2.1kAutomated safety check: PassCustom licence
Localize Campaignindranilbanerjee/digital-marketing-pro8591 repos~3.7kAutomated safety check: PassMIT
Chatbox i18n Translatorchatboxai/chatbox42k—~508Automated safety check: PassGPL-3.0

Similar skills

  • Internationalizing Websites

    aiskillstore/marketplace

    Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content.

    430 GitHub starsUsed in 2 repos~2k tokens
    Frontend & DesignAuto-check passed
  • A skill your agent uses when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized…

    344 GitHub starsUsed in 2 repos~1.9k tokens
    Frontend & DesignAuto-check passed
  • Builder UI I18n

    ChatbotXIO/ChatbotX

    Build or modify ChatbotX builder UI components, forms, tables, dialogs, shared UI usage, and translations.

    881 GitHub stars~2.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Localize Campaign

    indranilbanerjee/digital-marketing-pro

    Localize an entire campaign — emails, ads, social posts, landing pages, video scripts — for multiple markets, producing a deployment-ready per-market package: translations, transcreation options for…

    859 GitHub starsUsed in 1 repo~3.7k tokens
    Frontend & DesignAuto-check passed
  • Chatbox i18n Translator

    chatboxai/chatbox

    Translates new or changed i18n keys from a Chatbox Pro diff, staged changes or a commit range, writing the locale JSON files directly with a built-in glossary.

    42k GitHub stars~508 tokensUpdated 15 days ago
    Frontend & DesignAuto-check passed
  • Standards for keeping all user-facing text translatable: read the i18n config first, use namespaced keys, reuse shared strings and follow the key naming rules.

    33k GitHub starsUsed in 1 repo~1.9k tokens
    Frontend & DesignAuto-check passed

More from OpenClaudia/openclaudia-skills

All 74 skills in this repo
  • Competitor Traffic Report

    OpenClaudia/openclaudia-skills

    Build an interactive competitive-traffic report for any company and its rivals — monthly visits (SimilarWeb), organic search traffic and Domain Rating (Ahrefs) — as one self-contained HTML page with…

    713 GitHub stars~1.2k tokensUpdated 21 days ago
    Auto-check passed
  • Geo Difficulty

    OpenClaudia/openclaudia-skills

    Score how hard a keyword is to rank for in the AI-search era — page-level URL Rating of real competitors (not just domain DR), Ahrefs keyword difficulty, and whether a given site already ranks or is…

    713 GitHub stars~694 tokensUpdated 21 days ago
    Auto-check passed
  • Gsc Portfolio Audit

    OpenClaudia/openclaudia-skills

    Audit EVERY Google Search Console property at once — rank all sites by clicks and impressions with period-over-period deltas, then diff keywords per site to surface what is newly ranking, rising…

    713 GitHub stars~1k tokensUpdated 21 days ago
    Auto-check passed
  • Similarweb Traffic

    OpenClaudia/openclaudia-skills

    Fetch website traffic estimates (monthly visits, traffic sources, top countries, keywords, engagement, ranks) for any domain from SimilarWeb.

    713 GitHub stars~882 tokensUpdated 21 days ago
    Auto-check passed
  • Ahrefs Python

    OpenClaudia/openclaudia-skills

    Manages Ahrefs API usage in Python using ahrefs-python library.

    713 GitHub stars~1.9k tokensUpdated 21 days ago
    Auto-check passed
  • Ab Test Setup

    OpenClaudia/openclaudia-skills

    Design, plan, and analyze A/B tests with statistical rigor. An agent skill from OpenClaudia/openclaudia-skills.

    713 GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed

Works with

Questions about I18n

What does I18n do?

Add full internationalization (i18n) to a Next.js project using next-intl. I18n is an agent skill from OpenClaudia/openclaudia-skills.js project using next-intl.

When should I use I18n?

I18n fits situations like: the user asks to internationalize; add translations; add language support; translate my site.

How do I install I18n in Claude Code?

Run `npx skills add OpenClaudia/openclaudia-skills --skill i18n -a claude-code`. Or copy the skill folder (skills/i18n in OpenClaudia/openclaudia-skills) into .claude/skills/i18n in your project. Claude Code loads it when a task matches its description.

How do I install I18n in Codex?

Run `npx skills add OpenClaudia/openclaudia-skills --skill i18n -a codex`. Or copy the skill folder (skills/i18n in OpenClaudia/openclaudia-skills) into .agents/skills/i18n in your project. Codex loads it when a task matches its description.

Can I use I18n in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenClaudia/openclaudia-skills --skill i18n -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/i18n, .gemini/skills/i18n, .github/skills/i18n and .opencode/skills/i18n in your project.

What does I18n need to run?

Going by SKILL.md and its folder, I18n needs the command-line tools its instructions call (npm and git). Our summary lists: Python 3; Node.js.

Does I18n access the network?

SKILL.md contains no URLs. Its commands use npm and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is I18n safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does I18n use?

I18n is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does I18n use?

About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to I18n?

Skills that share tags, products or a category with I18n: Internationalizing Websites (aiskillstore/marketplace, 430 stars), Readme I18n (Y80/bmm, 344 stars), Builder UI I18n (ChatbotXIO/ChatbotX, 881 stars) and Localize Campaign (indranilbanerjee/digital-marketing-pro, 859 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains I18n?

OpenClaudia (a GitHub organization) maintains it in OpenClaudia/openclaudia-skills, which has 713 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on September 18, 2026.

Source: OpenClaudia/openclaudia-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.