- Home
- Skills
- Translation & Localization
- LocForge Extract Lite: i18n for React
More screenshots
Works with the AI Agents you already use
LocForge Extract Lite: i18n for React
Extracts hardcoded React strings into react-i18next keys and manages en.json locale files.
Free
LocForge Extract Lite: i18n for React
Example session with this skill installed
Extract all hardcoded strings from my components in /src/components and generate the en.json file. Use react-i18next conventions.
- Read your context and instructions
- Compiled the locforge extract lite
- Generated the UI component
I have scanned the /src/components directory. I identified 18 candidate strings across 4 files. I have replaced these strings with t() calls and updated your en.json file, ensuring all keys are sorted and existing translations are preserved.
Localization Extraction Report
| File | Strings Extracted | Status | Notes |
|---|---|---|---|
src/components/Header.tsx | 3 | Success | Replaced Nav links |
src/components/LoginForm.jsx | 8 | Success | Handled placeholders and labels |
src/components/UserDashboard.tsx | 5 | Success | Handled dynamic interpolation |
src/components/Footer.tsx | 2 | Success | Replaced copyright text |
Skipped Strings:
console.log("Auth initialized"): Technical log.data-testid="submit-btn": Testing attribute.className="flex p-4": CSS class.
Updated en.json
{
"auth": {
"login": "Log In",
"password_placeholder": "Enter your password",
"username_label": "Username"
},
"common": {
"cancel": "Cancel",
"save": "Save"
},
"dashboard": {
"welcome_user": "Welcome back, {{name}}!",
"items_count_one": "{{count}} item",
"items_count_other": "{{count}} items"
},
"navigation": {
"home": "Home",
"settings": "Settings"
}
}
Next steps
- Review the generated keys in
en.jsonto ensure the naming matches your preference. - Verify the
{{name}}interpolation inUserDashboard.tsxfunctions correctly with your data. - To translate
en.json, use LocForge: Translate src/locales/en.json into Spanish.
Header.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Manual internationalization is a slow, error-prone process that clutters React components with hardcoded strings. This skill automates the extraction of UI text into react-i18next structures, ensuring consistent key naming and valid JSON output. It identifies user-facing text in JSX tags, placeholders, alt text, and aria-labels while ignoring technical strings like class names or URLs.
What it does
- Source analysis scans .jsx and .tsx files to find candidate strings for translation.
- Smart extraction replaces hardcoded text with
t('key')calls using standardized naming conventions. - Complexity handling converts string interpolation and concatenation into single keys with placeholders.
- JSON management merges new keys into existing
en.jsonfiles while preserving and sorting existing data. - Context awareness filters out non-UI strings such as log outputs, test IDs, and enum values.
How it works
- Stack validation checks for React and
react-i18nextdependencies before proceeding. - Safety check verifies the git status to prevent overwriting uncommitted work without permission.
- Key approval presents a sample of proposed translation keys for manual review and confirmation.
- Automated refactor rewrites components and updates the central locale file.
- Verification runs a final scan to report any remaining strings that require manual attention.
Frameworks & tools
Built specifically for React and react-i18next. Uses Python for scanning logic if available, falling back to file-system parsing.
Why this beats prompting it yourself
Standard prompts often miss attributes like aria-label or break interpolation logic by creating fragmented keys. This skill enforces a strict naming schema and ensures one sentence equals one key, preventing the common mistake of splitting translatable units.
Use cases
- Initial setup for a React project moving from single-language to multi-language support.
- Component audits to find and extract hardcoded strings missed during development.
- Pluralization refactors to convert manual count logic into proper i18next plural keys.
Known limitations
Supports React only, not Next.js or Vue. Requires react-i18next to be pre-installed in package.json. Requires a clean git working tree or explicit user override.
Supports React only. Requires react-i18next to be pre-installed. Only scans .jsx and .tsx files. Does not perform the initial i18next configuration setup.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 17 days ago
- Free with an Agensi account
Requires