KaijuTranslator (KT) is an automated localization engine for PHP that generates static SEO mirrors using Large Language Models (OpenAI, DeepSeek, Gemini).
Unlike traditional "on-the-fly" JS translators, KT creates physical subdirectories (e.g., /en/, /ja/) with server-rendered content, ensuring 100% crawlability, proper hreflang implementation, and instant performance via file-based caching.
KT follows a "Zero-Rewrite" philosophy. Instead of modifying your existing routing or database, it works at the filesystem level to build a secondary, translated layer of your site.
graph TD
A["Original Page: index.php"] -->|KT Scanner| B{Stub Generator}
B --> C["/en/index.php"]
B --> D["/es/index.php"]
B --> E["/ja/index.php"]
C -->|Request| F[KT Runtime]
F -->|Capture| A
F -->|AI Brain| G(OpenAI / DeepSeek / Gemini)
G -->|Translate| H[HTML Injector]
H -->|SEO Tags| I[Final Rendered Page]
I -->|File Cache| J[Local Cache]
KT was built with a "Global Growth" mindset. It handles the technical debt of internationalization automatically:
- Native Subfolders: Physical directories ensure search engines can index every language version independently.
- Smart Hreflang: Automatically injects
<link rel="alternate" hreflang="...">tags for all active languages. - Sitemap Indexing: Generates per-language XML sitemaps and a parent
sitemap_index.xml. - Canonical Logic: Automatically handles canonical tags to avoid duplicate content penalties.
The fastest way to evaluate KT.
git clone https://github.com/branvan3000/KaijuTranslator.git
cd KaijuTranslator
docker compose up -dVisit http://localhost:8080 to see the example site in action.
- Upload the
KT/folder to your website's root. - Place
setup.phpanduninstall.phpin the root. - Open
yoursite.com/setup.phpand follow the wizard. - Run "Build Stubs" from the Dashboard at
/KT/dashboard.php.
KT supports the world's most powerful LLMs out-of-the-box. Switch providers in seconds via the configuration:
- OpenAI: Best for nuanced European languages.
- DeepSeek: Exceptional pricing/performance for coding and technical text.
- Google Gemini: Massive context window and excellent Asian language support.
- Isolation: 100% self-contained. Deleting
KT/and language folders reverts your site to its original state instantly. - Cache Layer: File-based caching ensures that after the first AI translation, pages load in milliseconds.
- Privacy: No tracking. Your API keys are stored locally in
KT/kaiju-config.php.
KT includes a custom test suite to ensure logic integrity.
To run all tests:
php KT/tests/run_tests.phpThe suite covers:
- Unit Tests: Logic for
HtmlInjector,Router, andCliHelper. - Integration Tests: End-to-end flow from stub request to AI translation.
We welcome contributions! Please check out our CONTRIBUTING.md to get started.
MIT License. Created by branvan3000.
Robust PHP translation engineering. Enterprise-grade global reach.

