mcpbeat Sign in

Internationalizing Websites Agent Skill

Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.

27k tokens
context cost
the whole folder, loaded on every use
7
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
176
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/ZhanlinCui/Agent-Skills-Hunter --skill Internationalizing Websites

The instruction itself

18 sections, as written by the author

Internationalizing Websites

Complete workflow for adding multi-language support to Next.js websites with SEO best practices.

When to use this Skill

  • Adding new language versions to existing website
  • Setting up i18n (internationalization) for new website
  • Configuring SEO for multiple languages
  • User mentions: "add language", "translation", "localization", "hreflang", "multi-language"

Supported Languages

Common target markets:

  • 🇺🇸 English (en) - Global market
  • 🇯🇵 Japanese (ja) - Asian market
  • 🇨🇳 Chinese (zh) - Chinese market

Extended support available for:

  • Korean (ko), Portuguese (pt), Spanish (es), French (fr), German (de)
  • Arabic (ar), Vietnamese (vi), Hindi (hi), Indonesian (id), Thai (th)
  • Traditional Chinese (zh-hk), Italian (it), Russian (ru)

Internationalization Workflow

Copy this checklist and track your progress:

i18n Progress:
- [ ] Step 1: Prepare base language files
- [ ] Step 2: Add new language files
- [ ] Step 3: Update configuration files
- [ ] Step 4: Add translations
- [ ] Step 5: Configure SEO elements
- [ ] Step 6: Validate and test

Step 1: Prepare base language files

Ensure English (en.json) files exist as templates:

Required directories:

  • i18n/messages/en.json - Main translations
  • i18n/pages/landing/en.json - Landing page translations

Verify structure:

# Check if base files exist
ls i18n/messages/en.json
ls i18n/pages/landing/en.json

If missing, create them with complete translation keys for your website.

Step 2: Add new language files

Run the language addition script:

node scripts/i18n-add-languages.mjs

What this script does:

  • Copies en.json to all target language files
  • Updates i18n/locale.ts with new locales
  • Updates i18n/request.ts with language mappings
  • Updates public/sitemap.xml with new language URLs

Script configuration (in i18n-add-languages.mjs):

  • languages array - List of languages to add
  • languageNames object - Language display names
  • targetDirs array - Directories containing translation files

See WORKFLOW.md for detailed step-by-step guide.

Step 3: Verify configuration updates

Check i18n/locale.ts:

export const locales = ["en", "ja", "zh", "ko", ...];

export const localeNames: any = {
  en: "English",
  ja: "日本語",
  zh: "中文",
  ko: "한국어",
  ...
};

Check i18n/request.ts:

  • Language code mappings configured
  • zh-CNzh, zh-HKzh-hk mappings present

Check public/sitemap.xml:

  • All language versions listed
  • hreflang tags present for each URL

Step 4: Add translations

Option A: Using AI translation (faster but needs review):

# Add structured data and pricing translations
node scripts/i18n-add-schema.js

Configure translations in the script's translations object.

Option B: Manual translation (recommended for quality):

Edit each language file with proper translations:

# Open language file
code i18n/messages/ja.json

Translation best practices:

  • Use native speakers when possible
  • Maintain SEO keywords in target language
  • Adapt content to local culture, don't just translate
  • Keep formatting consistent (placeholders, variables)

See reference/locale-codes.md for language code reference.

Step 5: Configure SEO elements

hreflang tags - Automatic via sitemap, but verify:

See reference/hreflang-guide.md for complete guide.

Localized meta tags - Translate in each language file:

{
  "metadata": {
    "title": "Your Site Title",
    "description": "Your SEO description"
  }
}

URL structure - Verify correct format:

  • English: https://example.com/ or https://example.com/en/
  • Japanese: https://example.com/ja/
  • Chinese: https://example.com/zh/

Step 6: Validate and test

Build the project:

npm run build

CRITICAL: Fix any errors before proceeding.

Manual testing:

  • Language switcher:
  • Visit each language version
  • Verify language switcher shows all languages
  • Click each language link, verify correct page loads
  • Content display:
  • Check all pages render correctly in each language
  • Verify no untranslated text (check for English in non-English pages)
  • Test special characters display correctly (Japanese, Chinese, Arabic)
  • SEO elements:
  • Inspect <html lang="..."> attribute matches page language
  • Verify <link rel="alternate" hreflang="..."> tags present
  • Check meta tags are in correct language

Automated validation:

# Check sitemap
curl https://your-site.com/sitemap.xml | grep hreflang

# Validate hreflang (use online tool)
# Google Search Console > Internationalization > hreflang

SEO checklist - See reference/seo-checklist.md.

If validation fails:

  • Review error messages carefully
  • Check configuration files for typos
  • Verify language codes are correct
  • Return to Step 3 and fix issues

Only proceed when all validations pass.

Important Notes

Language Code Standards

Use ISO 639-1 (two-letter codes) with optional regional variants:

  • en - English
  • ja - Japanese
  • zh - Simplified Chinese
  • zh-hk - Traditional Chinese (Hong Kong)
  • pt - Portuguese
  • pt-br - Brazilian Portuguese

See reference/locale-codes.md for complete list.

SEO Implications

Correct i18n improves SEO by:

  • Targeting users in their native language
  • Avoiding duplicate content penalties
  • Helping search engines serve correct language version

Common SEO mistakes to avoid:

  • ❌ Auto-redirect based on IP (prevents search engines from crawling all versions)
  • ❌ Missing hreflang tags (causes duplicate content issues)
  • ❌ Inconsistent URL structure across languages
  • ❌ Untranslated meta tags

Translation Quality

AI translation vs Human translation:

  • ✅ AI: Fast, cost-effective, good for initial draft
  • ⚠️ AI: May miss cultural nuances, needs review
  • ✅ Human: Better quality, cultural adaptation
  • ⚠️ Human: Slower, more expensive

Recommended approach:

  • Use AI to generate initial translations
  • Have native speaker review and refine
  • Test with target market users
  • Iterate based on feedback

Next.js i18n Routing

The system uses next-intl for routing:

  • Automatic locale detection from URL
  • Language switcher component
  • Localized navigation

Configuration in i18n/locale.ts and i18n/request.ts.

Post-Internationalization Tasks

After adding languages:

  • Submit updated sitemap to Google Search Console
  • Create separate Search Console properties for each language/region
  • Monitor international organic traffic in Analytics
  • A/B test translations if conversion rates differ by language
  • Set up alerts for international crawl errors

Script Locations

All i18n scripts are in the scripts/ directory:

  • i18n-add-languages.mjs - Add new language files
  • i18n-add-schema.js - Add structured data translations

Reference Materials

  • WORKFLOW.md - Detailed step-by-step workflow
  • reference/hreflang-guide.md - hreflang implementation guide
  • reference/locale-codes.md - Language codes reference
  • reference/seo-checklist.md - International SEO checklist

For troubleshooting, see WORKFLOW.md troubleshooting section.

Other skills for the same job

different authors, same section of the catalogue
Internal Comms
by anthropics
vendor ×13

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

6k tokens
Competitive Ads Extractor
by frostant
×10

Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.

2k tokens
Lead Research Assistant
by frostant
×8

Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.

2k tokens
Developer Growth Analysis
by frostant
×6

Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.

4k tokens
App Store Optimization
by alirezarezvani
×3

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

55k tokens scripts
Deeptools
by christophacham
×3

NGS analysis toolkit. BAM to bigWig conversion, QC (correlation, PCA, fingerprints), heatmaps/profiles (TSS, peaks), for ChIP-seq, RNA-seq, ATAC-seq visualization.

21k tokens scripts
Pymatgen
by christophacham
×3

Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.

26k tokens scripts
Enhance Prompt
by google-labs-code
vendor ×2

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

3k tokens

How to use it

Copy the folder

Take zhanlincui/internationalizing websites from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.