Skip to content
EhsanAzish80 edited this page Dec 15, 2025 · 2 revisions

🌍 auto-translate-localizables Wiki

Welcome to the comprehensive documentation for auto-translate-localizables!

A production-ready Python package that automates Xcode .xcloc localization using reproducible, CI-friendly machine translation—built for real iOS teams.

Version Python License


📚 Documentation

Getting Started

Using the Tool

Automation

Features & Safety

Advanced Topics

Troubleshooting & Help


🎯 Why This Tool Exists

Problem: Xcode exports .xcloc files for localization, but Apple provides no bulk translation workflow. Manual translation of hundreds of strings is tedious and error-prone.

Solution: This tool automates the entire process while maintaining safety through strict placeholder validation, XLIFF structure preservation, and CI-friendly modes.


✨ Key Features

🎯 Zero Configuration

  • Automatically detects Xcode .xcloc folders
  • Identifies source and target languages
  • Finds all XLIFF files recursively

🛡️ Strict Safety

  • Validates placeholder preservation (%@, %d, {0}, etc.)
  • XLIFF structure validation
  • Automatic backup and restore on errors
  • Dry-run mode for safe preview

🌐 Comprehensive Language Support

  • 113 languages with explicit mappings
  • Regional variants (zh-Hans, zh-Hant, pt-BR, es-419)
  • No Google auto-guess surprises

⚡ CI/CD Ready

  • --dry-run for safe testing
  • --only-missing for incremental updates
  • --fail-on-placeholder-mismatch for strict validation
  • Proper exit codes (0, 1, 130)
  • GitHub Actions workflows included

🔧 Multiple Interfaces

  • CLI: auto-translate-xcloc command
  • Python API: Import and use in your scripts
  • GUI: Desktop application with progress tracking
  • GitHub Actions: Automated PR creation

🚀 Quick Start

Installation

pip install auto-translate-localizables

Basic Usage

# Translate all languages in workspace
auto-translate-xcloc --workspace /path/to/localization

# Preview without changes
auto-translate-xcloc --workspace /path/to/localization --dry-run

# Only translate missing strings
auto-translate-xcloc --workspace /path/to/localization --only-missing

Python API

from auto_translate_localizables import XLIFFTranslator

translator = XLIFFTranslator(workspace_dir="/path/to/localization")
results = translator.process_all_languages(skip_languages=['en'])

📖 Documentation Index

By Task

By Feature


🤝 Getting Help


📝 License

MIT License - see LICENSE


Ready to get started?InstallationQuick Start

Clone this wiki locally