tomatophp / filament-translations-google
Translations Manager extension to use Google translation crawling to auto translate your __(), trans() fn
Package info
github.com/tomatophp/filament-translations-google
pkg:composer/tomatophp/filament-translations-google
Fund package maintenance!
Requires
- php: ^8.2
- filament/filament: ^5.0
- stichoza/google-translate-php: ^5.3
- tomatophp/console-helpers: ^1.1
- tomatophp/filament-translations: ^5.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.24
- nunomaduro/collision: ^8.6
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^4.0|^5.0
- pestphp/pest-plugin-arch: ^4.0|^5.0
- pestphp/pest-plugin-laravel: ^4.0|^5.0
- pestphp/pest-plugin-livewire: ^4.0|^5.0
- pestphp/pest-plugin-type-coverage: ^4.0|^5.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-14 15:03:36 UTC
README
Filament Google Translations
Translations Manager extension to use Google translation crawling to auto translate your __(), trans() fn
Version Compatibility
| Plugin | Filament | Laravel | PHP |
|---|---|---|---|
| 1.x | 3.x | 10.x / 11.x | 8.1+ |
4.x (v4 branch) |
4.x | 11.x / 12.x | 8.2+ |
| 5.x | 5.x | 12.x / 13.x | 8.2+ |
Screenshots
Installation
before install this package you need to have Translation Manager installed and configured
composer require tomatophp/filament-translations-google
after install your package please run this command
php artisan filament-translations-google:install
finally register the plugin on /app/Providers/Filament/AdminPanelProvider.php
->plugin(\TomatoPHP\FilamentTranslationsGoogle\FilamentTranslationsGooglePlugin::make())
Usage
Click the Google Translate button on the translations page and pick a language. A queued job translates the English text of every translation
(or its key when there is no English text) into that language, keeping :placeholders as they are, and notifies you when it is done.
Run a queue worker (php artisan queue:work) for the job to run.
It uses stichoza/google-translate-php, which calls the public Google Translate web endpoint: no API key is needed, but Google rate limits it and may block servers that send many requests.
The action follows the translation policy of the Translation Manager: it needs the create ability.
Use your own translator
The job resolves Stichoza\GoogleTranslate\GoogleTranslate from the container, so you can bind your own instance, for example with proxy options,
or a fake one that never calls Google (useful for a public demo or for tests):
use Stichoza\GoogleTranslate\GoogleTranslate; $this->app->bind(GoogleTranslate::class, fn () => new GoogleTranslate(options: ['proxy' => 'tcp://localhost:8125']));
Publish Assets
you can publish config file by use this command
php artisan vendor:publish --tag="filament-translations-google-config"
you can publish languages file by use this command
php artisan vendor:publish --tag="filament-translations-google-lang"
Testing
if you like to run PEST testing just use this command
composer test
Code Style
if you like to fix the code style just use this command
composer format
PHPStan
if you like to check the code by PHPStan just use this command
composer analyse
Other Filament Packages
Checkout our Awesome TomatoPHP


