*.xcstrings / metadata / release_notes
This script helps localize iOS .xcstrings files and App Store metadata using OpenAI's GPT models. It preserves formatting, placeholders, and developer comments — all while generating high-quality translations in multiple languages with a single command.
This is probably the most useful tool I’ve ever built — I use it every day.
While similar features exist in paid tools, I’m sharing this for free because anyone could build basic version in Cursor in just a few hours. The first version dates back to a time when no proper tools were available. Since then, I've gradually improved it.
🎥 Mobius Conference Talk (Russian)
This tool supports the following models:
gpt-4.1✅ (default and recommended)gpt-4-1106-previewgpt-4o-2024-05-13gpt-4o-mini-2024-07-18gpt-4.1-minigpt-3.5-turbo-1106
🧠
gpt-4.1provides the best translation quality based on my experience.gpt-4.1-1106-previewwas even better, but more expensive.⚠️ gpt-5andgpt-5-mininot tested.
2025-09-27
- Added automatic language detection from
.xcstringsfiles --localize_fromand--localize_toare now optional
2025-06-22
- Added support for plural strings
- Now supports batching multiple files in a single request
Make sure you have:
- Python 3.x
- An OpenAI API key
- Required Python packages:
pip3 install openai tiktoken argparse tqdm glob2- Localize App Store metadata and release notes
- Plural string support (handled separately with a special prompt)
- Process multiple
.xcstringsfiles at once - (Coming soon) Support for complex substitutions (e.g. multiple plurals in one string)
# Auto-detect languages
python3 localize_strings.py \
--gpt_api_key sk-... \
--files ./project_path/Localizable.xcstrings
# Or specify languages manually
python3 localize_strings.py \
--gpt_api_key sk-... \
--files ./project_path/Localizable.xcstrings \
--localize_from "en" \
--localize_to "ar,de,es,fi,fr,..."python3 localize_strings.py \
--gpt_api_key sk-... \
--files_pattern ./project_path/*.xcstrings \
--localize_from "en,ru" \
--localize_to "ar,de,es,fi,fr,hi,it,ja,ko,pl,pt,pt-BR,..."| Argument | Description |
|---|---|
--gpt_api_key |
Your OpenAI API key (required) |
--gpt_model |
GPT model to use (optional, default: gpt-4.1) |
--files |
Path to .xcstrings file(s) (required if --files_pattern not used) |
--files_pattern |
Pattern to match multiple files (e.g. *.xcstrings) |
--out_files |
Output path (optional, will overwrite originals if not provided) |
--localize_from |
Source language codes (comma-separated, e.g. en,ru) - auto-detected if not provided |
--localize_to |
Target language codes (comma-separated) - auto-detected if not provided |
--app_description |
App description to help GPT understand context (optional) |
--max_input_token_count |
Max token count for each request (optional) |
- Generates
.xcstringsfiles with translated strings - If
--out_filesis not set, it will overwrite the original files - Strings needing review will be marked accordingly
- Placeholders like
%@,%d, etc. are preserved - Ignore keys marked as
do not translate
To use localize_release_notes, install Fastlane and provide a valid API key JSON file:
{
"key_id": "CQC6F7C12K",
"issuer_id": "39a1de7c-d01c-41se-e052-532c7c1ja4p1",
"key": "-----BEGIN PRIVATE KEY-----\nMAGTAgEASBcGRyqG...\n-----END PRIVATE KEY-----",
"duration": 1200,
"in_house": false
}This script allows you to localize your app’s metadata: name, subtitle, description, keywords, and promotional text. While the localization of the name, subtitle, and keywords won't replace professional ASO, it's definitely better than having no localization at all.
This project is licensed under the MIT License. See the LICENSE file for details.
Have questions, suggestions, or feedback? Feel free to open an issue on GitHub, fork the repo, or submit a pull request — contributions are always welcome!
📧 Email: [email protected]


