PHPackages                             nicolae-soitu/filament-translations - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. nicolae-soitu/filament-translations

ActiveLibrary[Database &amp; ORM](/categories/database)

nicolae-soitu/filament-translations
===================================

Manage your translation with DB and cache, you can scan your languages tags like trans(), \_\_(), and get the string inside and translate them use UI.

v2.0.6(1y ago)05MITPHPPHP ^8.1|^8.2

Since Dec 28Pushed 1y agoCompare

[ Source](https://github.com/nicolae-soitu/filament-translations)[ Packagist](https://packagist.org/packages/nicolae-soitu/filament-translations)[ GitHub Sponsors](https://github.com/3x1io)[ RSS](/packages/nicolae-soitu-filament-translations/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (17)Versions (3)Used By (0)

[![Screenshot of Login](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/3x1io-tomato-translations.jpg)](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/3x1io-tomato-translations.jpg)

Filament Translations Manager
=============================

[](#filament-translations-manager)

Manage your translation with DB and cache, you can scan your languages tags like `trans()`, `__()`, and get the string inside and translate them use UI.

this plugin is build in [spatie/laravel-translation-loader](https://github.com/spatie/laravel-translation-loader)

This package is a fork of [tomatophp/filament-translations](https://github.com/tomatophp/filament-translations) with enhanced features:

- Built-in automatic translation using Google Translate and ChatGPT
- Bulk translation capabilities (all phrases, selected phrases, or individual phrases)
- Configurable AI model selection in config file
- Improved prompts for better multi-language support beyond English
- Extensible translator system - ability to add custom translators in config

[![Dependabot Updates](https://github.com/nicolae-soitu/filament-translations/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/nicolae-soitu/filament-translations/actions/workflows/dependabot/dependabot-updates)[![PHP Code Styling](https://github.com/nicolae-soitu/filament-translations/actions/workflows/fix-php-code-styling.yml/badge.svg)](https://github.com/nicolae-soitu/filament-translations/actions/workflows/fix-php-code-styling.yml)[![Tests](https://github.com/nicolae-soitu/filament-translations/actions/workflows/tests.yml/badge.svg)](https://github.com/nicolae-soitu/filament-translations/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/002b23a20b089ab3db944a070f37bc1f7570315e56363c45c00c9f784b5fadea/68747470733a2f2f706f7365722e707567782e6f72672f6e69636f6c61652d736f6974752f66696c616d656e742d7472616e736c6174696f6e732f76657273696f6e2e737667)](https://packagist.org/packages/nicolae-soitu/filament-translations)[![License](https://camo.githubusercontent.com/74a3e2a5e0ca9b88f6d7b6fe45cc560cf1565456a41eef389c21a3adf89aa2c4/68747470733a2f2f706f7365722e707567782e6f72672f6e69636f6c61652d736f6974752f66696c616d656e742d7472616e736c6174696f6e732f6c6963656e73652e737667)](https://packagist.org/packages/nicolae-soitu/filament-translations)[![Downloads](https://camo.githubusercontent.com/27162bd661d62038c7555a12cb3a00e49c258347e8beb5734deaf61bf137090a/68747470733a2f2f706f7365722e707567782e6f72672f6e69636f6c61652d736f6974752f66696c616d656e742d7472616e736c6174696f6e732f642f746f74616c2e737667)](https://packagist.org/packages/nicolae-soitu/filament-translations)

Screenshots
-----------

[](#screenshots)

[![Screenshot of list](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/translations-list.png)](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/translations-list.png)[![Screenshot of create](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/create.png)](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/create.png)[![Screenshot of edit](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/edit.png)](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/edit.png)[![Screenshot of scan](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/scan.png)](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/scan.png)[![Screenshot of import](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/import.png)](https://raw.githubusercontent.com/tomatophp/filament-translations/master/arts/import.png)

Installation
------------

[](#installation)

```
composer require nicolae-soitu/filament-translations
```

now run install command

```
php artisan filament-translations:install
```

Finally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`

```
$panel->plugin(\TomatoPhp\FilamentTranslations\FilamentTranslationsPlugin::make())
```

### Allow Create Button to Create New Language

[](#allow-create-button-to-create-new-language)

If you want to allow the user to create a new language, you need to add the following to your panel provider:

```
$panel->plugin(\TomatoPhp\FilamentTranslations\FilamentTranslationsPlugin::make()->allowCreate())
```

### Allow Clear All Translations Button

[](#allow-clear-all-translations-button)

If you want to allow the user to clear all translations, you need to add the following to your panel provider:

```
$panel->plugin(\TomatoPhp\FilamentTranslations\FilamentTranslationsPlugin::make()->allowClearTranslations())
```

Use Language Switcher
---------------------

[](#use-language-switcher)

we move language switcher to another package you can check it [Filament Language Switcher](https://github.com/tomatophp/filament-language-switcher/)

Scan Using Command Line
-----------------------

[](#scan-using-command-line)

You can scan your project to get all the languages tags and save them to the database

```
php artisan filament-translations:import
```

Configuring Translators
-----------------------

[](#configuring-translators)

To use automatic translation, make sure you have the following settings in your `config/filament-translations.php` configuration file:

```
    /*
     |--------------------------------------------------------------------------
     |
     | Translate only empty words.
     |
     */
    'only_empty_words' => true,

    /*
     |--------------------------------------------------------------------------
     |
     | Default locale for translation.
     |
     */
    'default_locale_for_translation' => 'en',

    /*
     |--------------------------------------------------------------------------
     |
     | Translators.
     |
     */
    'translators' => [
        'google' => [
            'allowed' => true,
            'handler' =>  TomatoPhp\FilamentTranslations\Translators\Google\GoogleTranslator::class,
            'chunk_size' => 100,
        ],
        'openai' => [
            'allowed' => true,
            'handler' =>  \TomatoPhp\FilamentTranslations\Translators\Openai\OpenaiTranslator::class,
            'chunk_size' => 50,
            'model' => 'gpt-3.5-turbo',
            'system_prompt' => 'You are a translator. Your job is to translate the following json object to the language specified in the prompt.',
            'user_prompt' => 'Translate the following json object from :from to :language, ensuring you return only the translated content in JSON format without added quotes or any other extraneous details and dont change the keys. Importantly, any word prefixed with the symbol ":" should remain unchanged and should not be translated the key "context" should be used to understand the meaning of the phrase',
        ],
    ],
```

Change Scan to work on Queue
----------------------------

[](#change-scan-to-work-on-queue)

In your config file just change the `use_queue_on_scan` to `true`

```
'use_queue_on_scan' => true,
```

Custom Import Command
---------------------

[](#custom-import-command)

You can create your own command to import the translations, add your custom import class to the config file like this:

```
'path_to_custom_import_command' => ImportTranslations::class,
```

This command will automatically run when you click on the "Scan For New Languages" button in the UI.

Custom Excel Import
-------------------

[](#custom-excel-import)

You can create your own Excel import to import the translations, add your custom import class to the config file like this:

```
'path_to_custom_excel_import' => CustomTranslationImport::class,
```

The import class is based on the Laravel Excel package. You can check the documentation [here](https://docs.laravel-excel.com/3.1/imports/). This import will automatically run when you click on the "Import" button in the UI.

Custom Excel Export
-------------------

[](#custom-excel-export)

You can create your own Excel export to export the translations in your own format, add your custom export class to the config file like this:

```
'path_to_custom_excel_export' => CustomTranslationExport::class,
```

The export class is based on the Laravel Excel package. You can check the documentation [here](https://docs.laravel-excel.com/3.1/imports/). This import will automatically run when you click on the "Export" button in the UI.

Show or hide buttons in the UI
------------------------------

[](#show-or-hide-buttons-in-the-ui)

You can show or hide the buttons in the UI by changing the config file. By default, all buttons are shown.

```
'show_import_button' => true,
'show_export_button' => false,
'show_scan_button' => false ,
```

Custom Resource
---------------

[](#custom-resource)

You can create your own resource to show the translations in the UI, add your custom resource class to the config file like this:

```
'translation_resource' => CustomResource::class,
```

This is especially useful when you want to have complete control over the UI but still want to use the translations package. Think about implementing a check on user roles when using `shouldRegisterNavigation` in your custom resource.

Translation Translations Resource Hooks
---------------------------------------

[](#translation-translations-resource-hooks)

we have add a lot of hooks to make it easy to attach actions, columns, filters, etc

### Table Columns

[](#table-columns)

```
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationTable;

public function boot()
{
    TranslationTable::register([
        \Filament\Tables\Columns\TextColumn::make('something')
    ]);
}
```

### Table Actions

[](#table-actions)

```
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationActions;

public function boot()
{
    TranslationActions::register([
        \Filament\Tables\Actions\ReplicateAction::make()
    ]);
}
```

### Table Filters

[](#table-filters)

```
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationFilters;

public function boot()
{
    TranslationFilters::register([
        \Filament\Tables\Filters\SelectFilter::make('something')
    ]);
}
```

### Table Bulk Actions

[](#table-bulk-actions)

```
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Table\TranslationBulkActions;

public function boot()
{
    TranslationBulkActions::register([
        \Filament\Tables\BulkActions\DeleteAction::make()
    ]);
}
```

### From Components

[](#from-components)

```
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Form\TranslationForm;

public function boot()
{
    TranslationForm::register([
        \Filament\Forms\Components\TextInput::make('something')
    ]);
}
```

### Page Actions

[](#page-actions)

```
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Actions\ManagePageActions;
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Actions\EditPageActions;
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Actions\ViewPageActions;
use TomatoPhp\FilamentTranslations\Filament\Resources\TranslationResource\Actions\CreatePageActions;

public function boot()
{
    ManagePageActions::register([
        Filament\Actions\Action::make('action')
    ]);

    EditPageActions::register([
        Filament\Actions\Action::make('action')
    ]);

    ViewPageActions::register([
        Filament\Actions\Action::make('action')
    ]);

    CreatePageActions::register([
        Filament\Actions\Action::make('action')
    ]);
}
```

Publish Assets
--------------

[](#publish-assets)

You can publish config file by use this command:

```
php artisan vendor:publish --tag="filament-translations-config"
```

You can publish views file by use this command:

```
php artisan vendor:publish --tag="filament-translations-views"
```

You can publish languages file by use this command:

```
php artisan vendor:publish --tag="filament-translations-lang"
```

You can publish migrations file by use this command:

```
php artisan vendor:publish --tag="filament-translations-migrations"
```

Testing
-------

[](#testing)

if you like to run `PEST` testing just use this command

```
composer test
```

Code Style
----------

[](#code-style)

if you like to fix the code style just use this command

```
composer format
```

PHPStan
-------

[](#phpstan)

if you like to check the code by `PHPStan` just use this command

```
composer analyse
```

Other Filament Packages
-----------------------

[](#other-filament-packages)

Checkout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance41

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

493d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6268a987421d7aaaaa8cd6092bf9b9340f9d6e412adcd24ea509eb5b3d0108c2?d=identicon)[NicolaeSoitu](/maintainers/NicolaeSoitu)

---

Top Contributors

[![fadymondy](https://avatars.githubusercontent.com/u/11937812?v=4)](https://github.com/fadymondy "fadymondy (73 commits)")[![Baspa](https://avatars.githubusercontent.com/u/10845460?v=4)](https://github.com/Baspa "Baspa (16 commits)")[![Udaberrico](https://avatars.githubusercontent.com/u/15997638?v=4)](https://github.com/Udaberrico "Udaberrico (3 commits)")[![KaramNassar](https://avatars.githubusercontent.com/u/43961632?v=4)](https://github.com/KaramNassar "KaramNassar (3 commits)")[![cliche23](https://avatars.githubusercontent.com/u/3168975?v=4)](https://github.com/cliche23 "cliche23 (2 commits)")[![mrvnklm](https://avatars.githubusercontent.com/u/24477241?v=4)](https://github.com/mrvnklm "mrvnklm (2 commits)")[![nicolae-soitu](https://avatars.githubusercontent.com/u/43182636?v=4)](https://github.com/nicolae-soitu "nicolae-soitu (2 commits)")[![daviddprtma](https://avatars.githubusercontent.com/u/76859181?v=4)](https://github.com/daviddprtma "daviddprtma (1 commits)")

---

Tags

phpspatielaraveltranslationslanguagetranslatedatabaseloaderi8ndbfilament-pluginlaravel-translation-loadertranslation-managerdatabase translationscache translationstranslation UI

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/nicolae-soitu-filament-translations/health.svg)

```
[![Health](https://phpackages.com/badges/nicolae-soitu-filament-translations/health.svg)](https://phpackages.com/packages/nicolae-soitu-filament-translations)
```

###  Alternatives

[tomatophp/filament-translations

Manage your translation with DB and cache, you can scan your languages tags like trans(), \_\_(), and get the string inside and translate them use UI.

6230.1k3](/packages/tomatophp-filament-translations)[spatie/laravel-translation-loader

Store your language lines in the database, yaml or other sources

8362.9M51](/packages/spatie-laravel-translation-loader)[codezero/laravel-unique-translation

Check if a translated value in a JSON column is unique in the database.

186965.1k7](/packages/codezero-laravel-unique-translation)[tomatophp/filament-types

Manage any type on your app in Database with easy to use Resource for FilamentPHP

5616.7k8](/packages/tomatophp-filament-types)[tomatophp/filament-alerts

Send notification to users using notification templates and multi notification channels, it's support Filament Native Notification Service with macro, and a full integration to FCM service worker notifications

7910.8k3](/packages/tomatophp-filament-alerts)[webparking/laravel-db-rebuild

A laravel package that allows for quick database rebuilds with presets.

448.8k](/packages/webparking-laravel-db-rebuild)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
