Install
$ agentstack add skill-ericfitz-skills-translate-to ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Translate to Language
Translate text into a specified target language while preserving placeholders, formatting, and tone.
Inputs
- source_text: The source text to translate (commonly English).
- targetlanguagecode: BCP 47 / ISO 15897 code (e.g.
es,fr,de,zh-CN,pt-BR). - targetlanguagename: Full language name as a hint for tone (e.g.
Spanish (Spain)). - context_key (optional): The i18n key (e.g.
error.save_failed,button.delete) to inform tone and brevity.
Output
Return only the translated string.
Process
1. Identify placeholders
Extract every placeholder and record its position so you can verify it survives translation.
| Pattern | Example | Notes | |---------|---------|-------| | {{var}} | {{count}}, {{user.email}} | Angular/Mustache/i18n interpolation | | {var} | {username}, {0} | Generic | | ${var} | ${total} | Template literals | | %s, %d, %f | %s items | printf-style | | %{var} | %{count} | Ruby/Rails-style | | [[var]] | [[user]] | Custom brackets | | ` | , ` | Numbered tags |
2. Analyze formatting
- Capitalization: Title Case / Sentence case / UPPER / lower
- Punctuation: trailing
.,!,?,:, ellipsis (...vs…), label colonName: - HTML entities:
,&,<,>," - Special characters:
\n,\t, escaped quotes - Length: button labels and short labels must stay concise
3. Infer tone from context key
| Key pattern | Tone | |-------------|------| | error.* / *.error | Formal, clear | | warning.* | Cautionary | | button.* / *.button | Concise, imperative | | tooltip.* / *.tooltip | Helpful, brief | | title.* / *.title | Formal, prominent | | placeholder.* | Instructive, brief | | label.* | Concise, descriptive | | confirm.* | Question form | | success.* | Positive, affirming | | help.* / *.hint | Helpful, guiding |
4. Translate
Rules:
- Preserve placeholders exactly — do not translate, modify, or alter their syntax.
- Match the formality the locale expects for UI text (e.g. Spanish formal "usted", French "vous", German "Sie", Russian "вы", Japanese です/ます).
- Keep similar length when reasonable, especially for buttons and labels.
- Preserve capitalization style, trailing punctuation, HTML entities, and escapes.
- Prefer natural target-language phrasing over literal translation.
- Handle gender/plurals appropriately for the target language.
5. Verify
Before returning, confirm:
- All placeholders from source appear in translation unchanged.
- Placeholder order is grammatically logical for the target language.
- Capitalization style matches source.
- Trailing punctuation is preserved.
- HTML entities are preserved.
- No stray whitespace or formatting changes.
Language-Specific Notes
- Spanish: inverted
¿...?,¡...!; accents required (sí,está). - French: spaces before
:,;,!,?; proper accents. - German: capitalize all nouns; compound words common.
- Chinese (zh-CN, zh-TW): no spaces between characters; use Chinese punctuation (
,。?!); keep Arabic numerals. - Japanese: mix kanji/hiragana/katakana; Japanese punctuation (
、。). - Arabic / Hebrew: RTL — placeholder positions may differ grammatically (UI handles direction).
- Russian: use «...» quotation marks; respect case endings.
Examples
Basic
source_text: "Delete"
target: es / Spanish
→ "Eliminar"
With placeholder
source_text: "Hello {{name}}, welcome back!"
target: fr / French
context_key: "greeting.welcome"
→ "Bonjour {{name}}, bienvenue !"
Multiple placeholders
source_text: "{{count}} items selected"
target: de / German
→ "{{count}} Elemente ausgewählt"
Preserved punctuation/quoting
source_text: "Are you sure you want to delete \"{{name}}\"?"
target: es / Spanish
context_key: "confirm.delete"
→ "¿Está seguro de que desea eliminar \"{{name}}\"?"
Label with colon
source_text: "Email Address:"
target: fr / French
context_key: "label.email"
→ "Adresse e-mail :"
Common Pitfalls
- Translating placeholders:
{{name}}must stay{{name}}, not{{nombre}}. - Changing placeholder syntax:
{{var}}must not become{var}or[[var]]. - Losing punctuation: if source ends with
., translation should too. - Inconsistent formality within a string.
- Over-translating loanwords/technical terms commonly used in English in the locale.
- Breaking HTML entities.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ericfitz
- Source: ericfitz/skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.