- Home
- Skills
- Frontend & Web Apps
- LocForge Extract: Make React, Next.js or Vue Translateable
More screenshots
Works with the AI Agents you already use
LocForge Extract: Make React, Next.js or Vue Translateable
Automate i18n extraction for React, Next.js, and Vue by moving hardcoded strings into en.json files.
$5
LocForge Extract: Make React, Next.js or Vue Translateable
Example session with this skill installed
Extract the hardcoded strings from src/components/LoginForm.tsx and update en.json. We are using Next.js with next-intl.
- Read your context and instructions
- Compiled the locforge extract
- Generated the UI component
I have scanned src/components/LoginForm.tsx, extracted the user-facing strings, and synced them with your translation file.
I18n Extraction Report
| File | Type | Key | Original Text |
|---|---|---|---|
src/components/LoginForm.tsx | Label | login.form.email_label | Email Address |
src/components/LoginForm.tsx | Placeholder | login.form.email_placeholder | Enter your email |
src/components/LoginForm.tsx | Button | login.form.submit_button | Sign In |
src/components/LoginForm.tsx | Aria-Label | login.form.close_aria | Close modal |
// src/components/LoginForm.tsx refactored
import { useTranslations } from 'next-intl';
export default function LoginForm() {
const t = useTranslations('login.form');
return (
<form>
<label>{t('email_label')}</label>
<input placeholder={t('email_placeholder')} aria-label={t('close_aria')} />
<button type="submit">{t('submit_button')}</button>
</form>
);
}
// messages/en.json updated
{
"login": {
"form": {
"email_label": "Email Address",
"email_placeholder": "Enter your email",
"submit_button": "Sign In",
"close_aria": "Close modal"
}
}
}
Next steps
- Run
python scripts/i18n_check.py src messages/en.jsonto verify no strings were missed. - To translate
en.json, use LocForge: Translatemessages/en.jsoninto Spanish.
LoginForm.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
Hardcoded strings in UI components make internationalization an expensive manual chore. This skill automates the extraction of user-facing text from React, Next.js, and Vue applications into structured translation files.
What it does
- String extraction scans JSX and Vue templates to find hardcoded text, placeholders, alt text, and aria-labels.
- Code refactoring replaces raw strings with
t('key')calls following framework-specific patterns. - Translation mapping generates or updates
en.jsonfiles while maintaining consistent key-naming conventions. - Environment setup configures
react-i18next,next-intl, orvue-i18nfor projects starting from scratch. - Quality auditing identifies missing keys, unused translations, and placeholder mismatches using integrated Python scripts.
How it works
- Analyze stack identifies the framework by reading
package.jsonand loads the corresponding implementation reference. - Scan components executes
scan.pyto draft a list of candidate strings for extraction. - Refactor source replaces validated user-facing strings with translation hooks and updates imports.
- Sync JSON writes the extracted values to the local translation file, ensuring sentences are not fragmented.
- Verify runs
i18n_check.pyto confirm no hardcoded leftovers remain and that all keys match.
Frameworks & tools
Specifically built for React, Next.js, Nuxt, and Vue. Supports react-i18next, next-intl, and vue-i18n. Requires Python 3.8+ for scanning scripts.
Why this beats prompting it yourself
Generic prompts often fragment sentences into multiple keys or miss hidden strings like aria-label and placeholder. This skill uses specialized scripts to ensure 1:1 sentence mapping and follows strict framework references to avoid breaking your component logic.
Use cases
- I18n preparation for shipping a React app to its first non-English market.
- Legacy cleanup to pull hardcoded strings out of old Vue components into a central JSON file.
- Audit existing apps to find missing translation keys or unused strings in
en.json. - Consistency enforcement to ensure all developers use the same key-naming pattern across a Next.js project.
Known limitations
Supports only React, Next.js, and Vue. Requires Python 3.8+ for scanning logic. Does not automatically translate text; only extracts and prepares it.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
Tested in: Claude Code, on a React + Vite app, a Vue 3 app and a Next.js App Router app; all three still build and render after extraction.
Review the diff before you commit. The scanner is a heuristic; the agent catches what it misses by reading each file it edits, and the report lists every line it was unsure of.
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 buying a skill.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
- Software
- tsc
Node.jsnuxi
Git