Search by

tomatophp / filament-translations-google

fadymondy

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!

fadymondy

Statistics

Installs: 3 265

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 0

5.0.0 2026-09-14 15:01 UTC

This package is auto-updated.

Last update: 2026-09-14 15:03:36 UTC


README

Screenshot

Filament Google Translations

Dependabot Updates PHP Code Styling Tests Latest Stable Version License Downloads

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

Google action Google modal

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