translation-key-extractor

Extract hardcoded strings and generate dot-notated translation keys.

6|2|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/Dexploarer/claudius-skills --skill translation-key-extractor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: translation-key-extractor
Source: https://github.com/Dexploarer/claudius-skills/tree/main/examples/intermediate/i18n-skills/translation-key-extractor
Command: npx skills add https://github.com/Dexploarer/claudius-skills --skill translation-key-extractor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It automatically detects hardcoded strings and converts them into i18n keys across codebases.

Core Features & Use Cases

  • Automated extraction: Finds hardcoded strings
  • Key generation: Creates descriptive keys
  • Translation file updates: Integrates with locale files

Quick Start

Run the extractor on your codebase to generate translation keys.

Frequently Asked Questions about translation-key-extractor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract hardcoded strings from my codebase for internationalization?

Extract hardcoded strings by scanning your source code to identify translatable text, then convert them into descriptive dot-notated keys grouped by scope (common, page, component). The extractor outputs file and line context alongside proposed keys and generates or updates translation resource files for i18n frameworks.

Can I use translation key extraction with JavaScript, TypeScript, Python, and Ruby?

Yes, the extractor works across JavaScript, TypeScript, Python, Ruby, and other languages. It identifies string literals in each language, excludes non-translatable artifacts, and generates keys compatible with common i18n frameworks.

What's the difference between manual key creation and automated extraction for i18n?

Automated extraction scans your entire codebase to find all hardcoded strings at once, generates consistent descriptive keys grouped by scope, and provides file and line references. Manual creation is slower and prone to inconsistency; extraction ensures comprehensive coverage and standardized key naming across your project.

How do I prepare my codebase before running the translation key extractor?

Ensure your source code is accessible and organized by language. The extractor scans string literals directly from your source files, so no special preprocessing is required—it works on your existing codebase structure.

What happens after I extract translation keys—how do I use them in my code?

The extractor outputs replacement guidance showing where to update your code to use the generated keys instead of hardcoded strings. You then integrate the keys with your i18n framework, update locale files with translations, and replace hardcoded strings in your source code.

Does the extractor exclude strings that shouldn't be translated?

Yes, the extractor identifies and excludes non-translatable artifacts like code identifiers and configuration values. It focuses on user-facing strings, generating keys only for text that should appear in translation files.