Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AI-powered file translator for PHP, JSON, and plain text formats. Translates language files using OpenRouter AI via Docker interface. Ideal for Laravel, Chrome Extensions, and multilingual projects.

NotificationsYou must be signed in to change notification settings

wonchoe/ai-php-json-files-language-translator

Repository files navigation

⚠️Before you start: You must haveDocker Desktop installed if you're on Windows or another operating system. This project won’t work without Docker.


💡 What is this?

This is anAI-powered file translator built for:

  • PHP language array files (e.g., Laravel translations)
  • JSON files (chome extension language files etc)
  • All other formats (PHP, TXT, HTML, XML, etc.)

It uses modern AI models viaOpenRouter API to automatically translate files in bulk, with full control over concurrency, batching, retries, and model selection.


📂 How it works

1. Clone the repository

git clone https://github.com/wonchoe/ai-php-json-files-language-translator.gitcd ai-php-json-files-language-translator

2. Build the Docker container (only once)

Build.BAT

(Or double-clickBuild.BAT if you're on Windows.)

3. Start the server

StartServer.BAT

(Or just double-clickStartServer.BAT.)

4. Use the web interface

  1. Place your files in theinput/ folder
  2. Open the interface athttp://localhost:3000
  3. Select thefile type:
    • PHP Arrays
    • JSON
    • Plain Text / Other
  4. Choose one or moretarget languages (uk,fr,de, or comma-separated:uk,fr,de)
  5. Enter yourOpenRouter API key
  6. Click the 🟦START TRANSLATION button

📝 Translated files will appear in theoutput/ folder.


📁 Folder structure

/input     ← source files to translate/output    ← translated output files/app       ← Node.js translation logic

⚙️ Interface

UI Screenshot

Inside the browser you can configure:

  • File type
  • Target languages
  • AI model
  • API keys
  • Max concurrency, retry delay, error threshold, and batch size

After clickingSTART TRANSLATION, the system will translate allinput/ files and save them inoutput/.


🗂 Supported file types

TypeExamples
PHP Arrays.php
JSON.json
Plain/Other.txt,.html,.xml,.yml,.md, etc.

✅ Works great for translatingChrome Extension language files (_locales/.../messages.json) for SEO localization and international Chrome Web Store presence.


🔑 API

Supports all models available viaOpenRouter.ai, including:

  • google/gemini-2.0-flash-lite-001
  • openai/gpt-3.5-turbo
  • anthropic/claude-3-haiku

👥 Who is it for?

  • Laravel / PHP developers
  • App & web developers working with localization files
  • SEO experts working on Chrome extensions & multilingual apps
  • Anyone who wants to bulk-translate structured files using AI

🙌 Author

This project was built to automate the translation of large-scale language files with fine-grained control and blazing speed using OpenRouter-powered AI.

About

AI-powered file translator for PHP, JSON, and plain text formats. Translates language files using OpenRouter AI via Docker interface. Ideal for Laravel, Chrome Extensions, and multilingual projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp