Google Translations plugin screenshot
Dark mode ready
Multilingual support
No v5.x support

Google Translations by Fady Mondy

Community

Translations Manager extension to use Google translation crawling to auto translate your __(), trans() fn

Tags: Developer Tool
Supported versions:
3.x
Fady Mondy avatar Author: Fady Mondy

Package health

Automated checks of this plugin's Composer package

68 / 100
Security 58
Maintenance 71
Ecosystem 100
15 checks
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 1 month ago

Documentation

Screenshot

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