New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

alareqi/filament-translatable-fields

This package adds a way to interact with alareqi/translatable-fields in Filament.
1,029
Install
composer require alareqi/filament-translatable-fields
Latest Version:2.1.0
PHP:^8.2
Laravel:10 · 11 · 12
Older releases:13
License:MIT
Last Updated:Oct 16, 2026
Links: GitHub  ·  Packagist
Maintainer: alareqi

Filament Translatable Fields

Latest Version on Packagist Total Downloads

This package adds a way to make all filament fields translatable. It uses the spatie/laravel-translatable package in the background.

Compatible with Laravel 10, 11, and 12.

Installation

You can install the package via composer:

composer require alareqi/filament-translatable-fields

Add the plugin to your desired Filament panel:

use Alareqi\FilamentTranslatableFields\FilamentTranslatableFieldsPlugin;

class FilamentPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                FilamentTranslatableFieldsPlugin::make(),
            ]);
    }
}

You can specify the supported locales:

use Alareqi\FilamentTranslatableFields\FilamentTranslatableFieldsPlugin;

class FilamentPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                FilamentTranslatableFieldsPlugin::make()
                    ->supportedLocales([
                        'en' => 'English',
                        'ar' => 'العربية',
                    ]),
            ]);
    }
}

By default, the package will use the app.locale if you don't specify the locales.

Usage

You can simply add ->translatable() to any field to make it translatable.

use Filament\Forms\Components\TextInput;

TextInput::make('name')
    ->label('Name')
    ->translatable(),

Overwrite locales

If you want to overwrite the locales on a specific field you can set the locales through the second parameter of the ->translatable() function.

use Filament\Forms\Components\TextInput;

TextInput::make('name')
    ->label('Name')
    ->translatable(true, ['en' => 'English', 'ar' => 'العربية', 'fr' => 'French']),

Good to know

This package will substitute the original field with a Filament\Forms\Components\Tabs component. This component will render the original field for each locale.

All chained methods you add before calling ->translatable() will be applied to the original field. All chained methods you add after calling ->translatable() will be applied to the Filament\Forms\Components\Tabs component.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

655,942,320 9,702
laravel/framework

The Laravel Framework.

617,629,957 34,997
laravel/tinker

Powerful REPL for the Laravel framework.

524,145,802 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

442,489,569 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

412,228,818 4,664

Version History

Version Released PHP Laravel License
2.1.0 ^8.2 ^10.0|^11.0|^12.0 MIT
v2.0.15 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
v2.0.13 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
v2.0.12 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
v2.0.11 ^8.2 ^10.0|^11.0|^12.0 MIT