Download the PHP package jayesh/laravel-gemini-translator without Composer

On this page you can find all versions of the php package jayesh/laravel-gemini-translator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-gemini-translator

Laravel Gemini AI Translation Extractor

An interactive Artisan command that scans your Laravel project for translation keys, translates them using Google's Gemini AI, and generates the necessary language files with advanced safety and performance features.

AI translations are a best-effort draft. The package asks Gemini for the language you selected and rejects some mixed-script or leftover-English output, but it cannot guarantee a perfect, literal, or single-language result. Gemini can still mix writing systems, slip in another language, or return wording that is not what you expected (for example a Gujarati run that also contains Hindi, Kannada, or English). Review generated files before you ship them. In the Translation Manager, turn on Highlight script faults. Re-run --refresh or --refresh-clean for bad rows.

Latest Version on Packagist Total Downloads License

πŸš€ Key Features

πŸ“‹ Requirements

⚑ Quick Start

1. Installation

Translation Manager page

The package registers the UI and JSON APIs for you. Open:

/translations-manager

Example: http://127.0.0.1:8000/translations-manager

Auth is automatic:

Optional publish (only if you want to edit the Blade or serve CSS/JS as files):

That copies views to resources/views/vendor/gemini-translator/ and CSS/JS to public/vendor/gemini-translator/. After publishing assets, pass $assetCss / $assetJs to use those files instead of the inlined CSS/JS.

If you already published and then upgrade the package, Laravel keeps your old copies. Overwrite them or remove them so the package files load again:

--force on --tag=gemini-translator-config overwrites your local config edits. PHP from the package is never published; composer update always uses the new code.

Change the URL or turn the UI off in config/gemini-translator.php (publish with --tag=gemini-translator-config):

Or .env:

To drop the workspace into an existing layout:

The include picks up the registered /translations-manager/* endpoints automatically.

The table reads every lang tree Laravel knows about: lang/, Modules/*/lang, published resources/lang/modules/{name}, and any extra directory passed to loadJsonTranslationsFrom() / loadTranslationsFrom(). If a module (or the app) registers more than one folder β€” for example lang/, lang/app3/, and lang/web/ β€” each pack stays a separate set of keys. Select Module, then Pack, to work on one folder at a time.

Highlight script faults (checkbox next to β€œShow only missing”, off until you turn it on) uses the same writing-system map as the CLI. A Gujarati cell with Devanagari or Latin letters, or an English cell with Indic script, gets an amber outline and a tooltip of the unexpected scripts. Laravel placeholders (:name, {0}, [2,*]) are ignored. The choice is stored in localStorage as gemini-translator-malform-detector. If you published the manager views/assets, republish --tag=gemini-translator-manager to pick this up.

The Artisan command uses the same pack step: after you pick a module that has extra lang folders, it asks which packs to process (lang/, lang/app3/, lang/web/). Then it lists JSON and PHP files from those packs only. Modules with a single lang/ tree skip that prompt.

2. Configuration

Add to your .env:

Or one run at a time:

Precedence: --model β†’ GEMINI_TRANSLATOR_MODEL / config/gemini-translator.php β†’ config('gemini.model') β†’ package default. Paid models are allowed; they are not free-tier RPM-capped unless you add them to the snapshot.

Get your API key from Google AI Studio.

⚠️ IMPORTANT: If you published the config/gemini.php file from the google-gemini-php/laravel package, make sure the request_timeout is cast to an integer:

3. Basic Usage

πŸ“– Documentation

For detailed documentation, step-by-step guides, and advanced usage examples, visit our comprehensive documentation:

πŸ“š Full Documentation

πŸ”§ Available Options

Basic Options

Advanced Options

Mode Compatibility

πŸ—οΈ File Structure & Support

Directory Structure

Supported File Types

Translation Functions

Supports all quote types: single ('), double ("), and backtick (`).

🌐 Internationalization Features

Locale Support

Translation Quality

πŸš€ Performance & Safety

Concurrency Options

Safety Features

Framework Integration

πŸ›‘οΈ Security Features

πŸ› Troubleshooting

Rate Limits (Gemini free tier)

Google can change free-tier RPM/RPD, drop a model to 0, or introduce a higher-quota model at any time. The table below is a snapshot as of 2026-08-13, not an API contract.

Publish and edit config/gemini-translator.php when AI Studio disagrees with the snapshot:

Model In ListModels RPM RPD
gemini-3.5-flash-lite (package default) yes 15 500
gemini-3.1-flash-lite yes 15 500
gemini-2.5-flash-lite yes 10 20
gemini-2.5-flash yes 5 20
gemini-3.5-flash yes 5 20
gemini-3.6-flash yes 5 20

Performance Tips

Common Issues

Configuration Error: "must be an integer, string given"

If you see this error:

Fix: Edit config/gemini.php and cast the timeout to integer:

Other Issues

Debugging

🏒 Enterprise Features

Module Support

Production Ready

Quality Assurance

πŸ“œ License

The MIT License (MIT). Please see License File for more information.


⭐ Star this repo if you find it helpful! | πŸ› Report issues on GitHub | πŸ“– Read full docs at Here


All versions of laravel-gemini-translator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^11.0||^12.0||^13.0
google-gemini-php/laravel Version ^2.0
spatie/fork Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jayesh/laravel-gemini-translator contains the following files

Loading the files please wait ...