Skip to content
Back to skills

I18n Extract

ASecurity

Extracts translatable strings from source code into locale files for internationalization projects

  • 5 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 4, 2026
ai-agentspythonbash

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add shahshrey/skill-trainer --skill i18n-extract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of I18n Extract?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for I18n Extract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shahshrey-i18n-extract/badge)](https://www.skillsdirectory.com/skills/shahshrey-i18n-extract)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: i18n-extract
description: Extracts translatable strings from source code into locale files for internationalization projects
---

## Overview

This skill automates the process of identifying and extracting user-facing strings from source code and organizing them into locale-specific translation files. It scans your codebase for marked translatable content and generates locale files (JSON, YAML, or PO format) that translators can work with.

## What it does

- Scans source code for translation markers (e.g., `i18n("key")`, `t("message")`)
- Extracts strings while preserving context and pluralization rules
- Generates locale files in your chosen format
- Validates extracted strings for consistency
- Updates existing locale files without losing manual translations

## Quick start

Run the extraction script on your project:

```bash
python scripts\extract.py --source src/ --output locales/ --format json
```

This scans the `src/` directory and generates JSON locale files in the `locales/` folder.

## Configuration options

Customize extraction with these flags:

- `--source` (required): Directory containing source files to scan
- `--output` (required): Output directory for locale files
- `--format`: Choose `json` (default), `yaml`, or `po` format
- `--languages`: Comma-separated list of target languages

## Handling pluralization

Different languages have different pluralization rules. See the reference files for detailed information:

- Basic format specifications: [references/formats.md](references/formats.md)
- Language-specific plural rules: [references/plural-rules.md](references/plural-rules.md)

## Common workflows

- **Initial setup**: Run extraction on a fresh project to create base locale files
- **Incremental updates**: Run periodically to find new strings as you add features
- **Consistency checks**: Validate that all marked strings follow your project's conventions
- **Batch updates**: Process multiple projects with different format requirements

## Requirements

- Python 3.8+
- Source files must use consistent translation markers
- Output directory must exist or be creatable

Files in this skill

  • SKILL.md2.1 KB
  • references/formats.md973 B
  • references/plural-rules.md1017 B
  • scripts/extract.py1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.