# Manage i18n translations with Localhero.ai

Managing multi-language translations across large projects is tedious and error-prone. This skill helps AI coding assistants write source strings correctly, follow project naming conventions, and integrate with Localhero.ai translation workflows.

## Install

```bash
npx skillstore add localheroai/localhero
```

## Metadata

- - Slug: localheroai-localhero
- - Version: 1.0.0
- - Author: localheroai
- - GitHub username: localheroai
- - License: MIT
- - Repository: https://github.com/localheroai/agent-skill/tree/main/
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: safe
- - Quality score: 81
- - Quality tier: silver
- - Public page: https://skillstore.pages.dev/skills/localheroai-localhero
- - Manifest: https://skillstore.pages.dev/api/skills/localheroai-localhero/manifest

## Capabilities

- Writes source language i18n strings following project conventions
- Reads glossary terms and project settings for consistent terminology
- Adds or modifies translation keys in JSON, YAML, or PO/POT files
- Generates translations using Localhero.ai CLI
- Explains i18n file structure and key naming patterns
- Guides users to Localhero.ai web UI for translation review

## Use Cases

- Adding new UI strings to a multi-language app: Developer needs to add a new feature with user-facing text. The skill examines existing keys, follows naming patterns, and writes correct source strings.
- Fixing inconsistent terminology across translations: Developer wants to ensure product names and technical terms match the glossary. The skill loads glossary terms and suggests correct usage.
- Setting up i18n for a new project: New project needs i18n infrastructure. The skill explains how to initialize Localhero, configure locales, and follow best practices for key naming.

## Prompt Templates

### Add new translation keys

```
Add translation keys for the new onboarding flow. The screen has a welcome heading, two paragraphs of explanatory text, and three buttons: 'Get Started', 'Learn More', and 'Skip'.
```

### Follow existing naming conventions

```
We need to add keys for the user profile settings page. Check the existing source files first to understand our naming pattern, then add keys for the page title, section headings, and form labels.
```

### Handle gettext format correctly

```
This project uses gettext PO files. We added a new error message: 'The file could not be saved because the disk is full'. Add this as a msgid with appropriate msgctxt for context.
```

### Integrate with translation workflow

```
Review the localhero.json configuration and our source translation file. Check if we have a GitHub workflow set up for automatic translations, and if not, run the CLI to generate translations for our new keys.
```

## Limitations

- Only writes source language strings, does not directly edit target translations
- Requires Localhero.ai account and CLI authentication to function
- Cannot access project glossary or settings without running CLI commands

## Best Practices

- Run \`npx @localheroai/cli glossary --output json\` before writing user-facing strings to ensure terminology consistency
- Examine existing source files first to match the project's key naming pattern \(JSON dot notation, YAML nested, or gettext msgid\)
- Group related keys by feature or page \(e.g., dashboard.\*, checkout.\*\) for easier maintenance and discovery

## Anti Patterns

- Do not write target language translations directly - only write source language strings and let Localhero.ai handle translations
- Avoid generic key names like 'text1' or 'label2' - use descriptive names that indicate content purpose like 'checkout.submit\_button'
- Do not skip the glossary check - inconsistent terminology across languages frustrates users and complicates translation updates

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-03-21T23:25:54.768\+00:00
- - Summary: This skill is a legitimate i18n translation management tool. All 75 static analysis detections are false positives. The detected 'shell backtick execution' patterns are markdown code blocks documenting CLI usage, not actual code execution. The 'credential access' references are documentation about API key configuration. The 'network' detections are legitimate URLs to the Localhero.ai service website. The skill uses the standard allowed-tools directive to run the Localhero CLI for translation management only.

## Stats

- - Views: 79
- - Downloads: 4
- - Favorites: 0
- - Popularity score: 0
