from Hacker News

I made translator-AI – AI-powered internationalization translator (Ollama etc.)

by sylwester on 6/20/25, 2:04 PM with 2 comments

  • by sylwester on 6/21/25, 7:28 AM

    Several new features added:

        * Multiple AI Providers: Choose between Google Gemini, OpenAI (cloud) or Ollama/DeepSeek (local) for translations
        * Multi-File Support: Process multiple files with automatic deduplication to save API calls
        * Incremental Caching: Only translates new or modified strings, dramatically reducing API calls
        * Batch Processing: Intelligently batches translations for optimal performance
        * Path Preservation: Maintains exact JSON structure including nested objects and arrays
        * Cross-Platform: Works on Windows, macOS, and Linux with automatic cache directory detection
        * Developer Friendly: Built-in performance statistics and progress indicators
        * Cost Effective: Minimizes API usage through smart caching and deduplication
        * Language Detection: Automatically detect source language instead of assuming English
        * Multiple Target Languages: Translate to multiple languages in a single command
        * Translation Metadata: Optionally include translation details in output files for tracking
        * Dry Run Mode: Preview what would be translated without making API calls
        * Format Preservation: Maintains URLs, emails, dates, numbers, and template variables unchanged
  • by sylwester on 6/20/25, 2:04 PM

    I’ve been building a CLI tool to automate i18n string translation based on JSON files (like used in i18n frameworks).

    It currently implements Google Gemini or Ollama support with flexible model choices. Also deduplicates across files and caches results to avoid repeats and reduce API usage, plus it uses dynamic batch sizing. Additionally, it implements also a MCP server, supports batch processing, doing translations to multiple languages at once with filename templating etc.

    Would love feedback or ideas from others working on similar things.