New to Claude Skills? Learn how to install them →

davila7 on GitHub

i18n Localization

Free

Streamline your app's internationalization and localization process.

Get this skill

Free · Opens the source repo

What i18n Localization does

The i18n Localization skill provides developers with best practices and tools for implementing internationalization (i18n) and localization (l10n) in their applications. It focuses on detecting hardcoded strings, managing translations, and ensuring support for right-to-left (RTL) languages. By following the guidelines laid out in this skill, you can make your application translatable and culturally relevant for different regions and languages.

This skill is particularly useful for developers working on public web applications or SaaS products that require localization to cater to a diverse user base. It emphasizes the importance of using translation keys instead of hardcoded strings, which helps maintain the integrity of the application’s code while making it easier to manage translations. The skill also outlines the necessary file structure for locale management, ensuring that all translations are organized and easily accessible.

Additionally, the skill includes a Python script, i18n_checker.py, which can be run to detect hardcoded strings and missing translations within your project. This script serves as a practical tool to ensure that your application adheres to internationalization best practices before deployment. The skill covers common issues developers may encounter, such as missing translations and incorrect date or number formatting, providing clear solutions to these problems.

By adopting the i18n Localization skill, developers can create applications that are not only functional but also accessible to a global audience, enhancing user experience and broadening market reach.

When to use it

Use this skill when developing public-facing applications or SaaS products that need to support multiple languages and regions.

When not to use it

This skill may not be necessary for personal projects or single-region applications where localization is not a priority.

What you can build with it

Public Web Application

When developing a public web application, use this skill to ensure your app is fully translatable and culturally relevant.

SaaS Product Development

For SaaS products targeting a global audience, this skill helps manage translations and locale files effectively.

Preparing for Future Localization

If you are considering future localization for an internal tool or personal project, this skill provides foundational practices to implement from the start.

How to install i18n Localization

View source

1. Install with the skills CLI

npx skills add davila7/claude-code-templates/i18n-localization --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by davila7

i18n & Localization

Internationalization (i18n) and Localization (L10n) best practices.


1. Core Concepts

TermMeaning
i18nInternationalization - making app translatable
L10nLocalization - actual translations
LocaleLanguage + Region (en-US, tr-TR)
RTLRight-to-left languages (Arabic, Hebrew)

2. When to Use i18n

Project Typei18n Needed?
Public web app✅ Yes
SaaS product✅ Yes
Internal tool⚠️ Maybe
Single-region app⚠️ Consider future
Personal project❌ Optional

3. Implementation Patterns

React (react-i18next)

import { useTranslation } from 'react-i18next';

function Welcome() {
  const { t } = useTranslation();
  return <h1>{t('welcome.title')}</h1>;
}

Next.js (next-intl)

import { useTranslations } from 'next-intl';

export default function Page() {
  const t = useTranslations('Home');
  return <h1>{t('title')}</h1>;
}

Python (gettext)

from gettext import gettext as _

print(_("Welcome to our app"))

4. File Structure

locales/
├── en/
│   ├── common.json
│   ├── auth.json
│   └── errors.json
├── tr/
│   ├── common.json
│   ├── auth.json
│   └── errors.json
└── ar/          # RTL
    └── ...

5. Best Practices

DO ✅

  • Use translation keys, not raw text
  • Namespace translations by feature
  • Support pluralization
  • Handle date/number formats per locale
  • Plan for RTL from the start
  • Use ICU message format for complex strings

DON'T ❌

  • Hardcode strings in components
  • Concatenate translated strings
  • Assume text length (German is 30% longer)
  • Forget about RTL layout
  • Mix languages in same file

6. Common Issues

IssueSolution
Missing translationFallback to default language
Hardcoded stringsUse linter/checker script
Date formatUse Intl.DateTimeFormat
Number formatUse Intl.NumberFormat
PluralizationUse ICU message format

7. RTL Support

/* CSS Logical Properties */
.container {
  margin-inline-start: 1rem;  /* Not margin-left */
  padding-inline-end: 1rem;   /* Not padding-right */
}

[dir="rtl"] .icon {
  transform: scaleX(-1);
}

8. Checklist

Before shipping:

  • All user-facing strings use translation keys
  • Locale files exist for all supported languages
  • Date/number formatting uses Intl API
  • RTL layout tested (if applicable)
  • Fallback language configured
  • No hardcoded strings in components

Script

ScriptPurposeCommand
scripts/i18n_checker.pyDetect hardcoded strings & missing translationspython scripts/i18n_checker.py <project_path>

Frequently asked questions about i18n Localization

Similar skills