Skip to content
i18n-localization logo

i18n & Localization

i18n-localization

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

Ab-aswini/Agent-kit-P10installs2stars

SKILL.md

Full skill instructions

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>

More skills from Ab-aswini

bash-linux logo
Ab-aswini/Agent-kit-P1

bash-linux

Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.

2 0
View
systematic-debugging logo
Ab-aswini/Agent-kit-P1

systematic-debugging

4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.

2 0
View
python-patterns logo
Ab-aswini/Agent-kit-P1

python-patterns

Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying.

2 0
View
behavioral-modes logo
Ab-aswini/Agent-kit-P1

behavioral-modes

AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.

2 0
View
game-design logo
Ab-aswini/Agent-kit-P1

game-design

Game design principles. GDD structure, balancing, player psychology, progression.

2 0
View
mcp-builder logo
Ab-aswini/Agent-kit-P1

mcp-builder

MCP (Model Context Protocol) server building principles. Tool design, resource patterns, best practices.

2 0
View
lint-and-validate logo
Ab-aswini/Agent-kit-P1

lint-and-validate

Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.

2 0
View
frontend-design logo
Ab-aswini/Agent-kit-P1

frontend-design

Design thinking and decision-making for web UI. Use when designing components, layouts, color schemes, typography, or creating aesthetic interfaces. Teaches principles, not fixed values.

2 0
View
Docker Skill logo
Ab-aswini/Agent-kit-P1

Docker Skill

> Loaded by: DevOps Division agents | Version: 1.0

2 0
View
nextjs-react-expert logo
Ab-aswini/Agent-kit-P1

nextjs-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.

2 0
View
React Skill logo
Ab-aswini/Agent-kit-P1

React Skill

> Loaded by: Frontend Division agents | Version: 1.0

2 0
View
templates logo
Ab-aswini/Agent-kit-P1

templates

Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.

2 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View