Ios localization
This skill should be used when the user asks to "translate iOS app", "localize xcstrings", "add translations to Localizable.xcstrings", "translate strings to multiple languages", or mentions iOS localization, xcstrings files, or app translation workflows.From its SKILL.md
npx -y skills add trmquang93/ios-dev-kit --skill ios-localizationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.9 KB, as published. Nobody here has run it
iOS Localization Skill
Translate Localizable.xcstrings files in iOS projects efficiently using haiku agents for each target language.
Overview
This skill provides a workflow for translating iOS app strings to multiple languages:
- Extract strings needing translation
- Mark non-translatable strings (aspect ratios, brands, etc.)
- Launch sequential haiku agents for each language
- Verify completion and fix gaps
Script Location
All helper scripts are located in ${CLAUDE_SKILL_DIR}/scripts/ and should be run directly from there (no need to copy to your project).
Quick Start Workflow
Step 1: Locate the xcstrings File
Find the Localizable.xcstrings file in the iOS project:
find . -name "*.xcstrings" -type f
Step 2: Mark Non-Translatable Strings
Identify and mark strings that should not be translated:
python3 ${CLAUDE_SKILL_DIR}/scripts/mark_non_translatable.py path/to/Localizable.xcstrings \
"1:2" "2:3" "3:4" "4:3" "9:16" "16:9" \
"A4" "A5" "OK" "PDF" \
"FB Cover" "IG 5:4"
Common non-translatable strings:
- Aspect ratios:
1:2,16:9,4:3 - Paper sizes:
A4,A5 - Universal terms:
OK,PDF,USB - Brand names: Product names, company names
- Social media formats:
FB Cover,IG Post
Step 3: Verify Current State
Check translation completion status:
python3 ${CLAUDE_SKILL_DIR}/scripts/verify_translations.py path/to/Localizable.xcstrings
Or specify target languages:
python3 ${CLAUDE_SKILL_DIR}/scripts/verify_translations.py path/to/Localizable.xcstrings fr,de,es,ja,ko,zh-Hans
Step 4: Launch Translation Agents
For each target language, launch a haiku agent sequentially:
Use the Task tool with:
- subagent_type: "general-purpose"
- model: "haiku"
- prompt: Translation instructions (see below)
Translation Agent Prompt Template:
Translate iOS app strings from English to [LANGUAGE] ([LANG_CODE]).
## Instructions
1. Extract strings needing translation:
python3 ${CLAUDE_SKILL_DIR}/scripts/extract_strings.py path/to/Localizable.xcstrings [LANG_CODE]
2. Translate ALL strings to [LANGUAGE]. Rules:
- Preserve format specifiers (%lld, %@, %d) exactly
- Keep & symbol in strings like "& BACKGROUND"
- Use natural [LANGUAGE] phrasing for a photo editing app
3. Save translations and update:
cat > /tmp/translations_[LANG_CODE].json << 'EOF'
{ "English key": "Translation", ... }
EOF
python3 ${CLAUDE_SKILL_DIR}/scripts/update_translations.py path/to/Localizable.xcstrings [LANG_CODE] /tmp/translations_[LANG_CODE].json
Complete ALL translations. Do not skip any strings.
Step 5: Verify Completion
After all agents complete, verify:
python3 ${CLAUDE_SKILL_DIR}/scripts/verify_translations.py path/to/Localizable.xcstrings
Fix any gaps by launching targeted agents for incomplete languages.
Helper Scripts
All scripts are located at ${CLAUDE_SKILL_DIR}/scripts/
extract_strings.py
Extract strings needing translation for a language:
python3 ${CLAUDE_SKILL_DIR}/scripts/extract_strings.py <xcstrings_path> <lang_code>
# Output: JSON with {"key": "english_value", ...}
update_translations.py
Update xcstrings with translations:
python3 ${CLAUDE_SKILL_DIR}/scripts/update_translations.py <xcstrings_path> <lang_code> <translations.json>
verify_translations.py
Check translation completion:
python3 ${CLAUDE_SKILL_DIR}/scripts/verify_translations.py <xcstrings_path> [lang1,lang2,...]
mark_non_translatable.py
Mark strings as non-translatable:
python3 ${CLAUDE_SKILL_DIR}/scripts/mark_non_translatable.py <xcstrings_path> "key1" "key2" ...
Common Target Languages
| Priority | Languages |
|---|---|
| Tier 1 | en, zh-Hans, zh-Hant, ja, ko, es, fr, de |
| Tier 2 | pt-BR, it, nl, pl, ru, tr, ar |
| Tier 3 | vi, th, id, ms, cs, da, sv, no, fi |
Translation Rules
Always Preserve
- Format specifiers:
%lld,%@,%d,%f - Positional arguments:
%1$@,%2$d - Special symbols in context:
&,+ - Newlines:
\n
Keep As-Is (shouldTranslate: false)
- Technical identifiers
- Aspect ratios and dimensions
- Brand and product names
- Universal abbreviations
Translate
- UI labels and buttons
- Status and error messages
- Feature names and descriptions
- Settings and preferences
- Onboarding text
Sequential Agent Execution
Launch agents one at a time to avoid file conflicts:
Order: zh-Hans -> zh-Hant -> ja -> ko -> es -> fr -> de -> ...
Each agent:
- Reads current file state
- Extracts untranslated strings
- Translates all strings
- Updates file with translations
Troubleshooting
JSON Parse Errors
If xcstrings file becomes corrupted:
python3 -m json.tool Localizable.xcstrings > /dev/null
Missing Translations After Agent
Re-run extract to check:
python3 ${CLAUDE_SKILL_DIR}/scripts/extract_strings.py Localizable.xcstrings <lang_code> | jq 'keys | length'
If count > 0, translations are missing. Re-run agent.
Format Specifier Mismatch
Verify format specifiers match between source and translation. Common issues:
%lldchanged to%d%@removed or duplicated- Positional arguments reordered incorrectly
Additional Resources
Reference Files
references/xcstrings-format.md- Detailed xcstrings format documentation
Scripts
scripts/extract_strings.py- Extract untranslated stringsscripts/update_translations.py- Update xcstrings with translationsscripts/verify_translations.py- Verify translation completionscripts/mark_non_translatable.py- Mark non-translatable strings