PHPackages                             go2stone/filament-translatable - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. go2stone/filament-translatable

ActiveLibrary[Localization &amp; i18n](/categories/localization)

go2stone/filament-translatable
==============================

This package adds a way to interact with go2stone/translatable in Filament.

11.5kPHP

Since Dec 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Go2Stone/filament-translatable)[ Packagist](https://packagist.org/packages/go2stone/filament-translatable)[ RSS](/packages/go2stone-filament-translatable/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Filament Translatable](docs/images/banner.png)](docs/images/banner.png)

Filament Translatable
=====================

[](#filament-translatable)

### This package cloned from [outerweb-filament-translatable-fields](https://github.com/outer-web/filament-translatable-fields)

[](#this-package-cloned-from-outerweb-filament-translatable-fields)

We are using this for our use cases.

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

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

[](#installation)

First install and configure your model(s) to use the `spatie/laravel-translatable` package.

You can install the package via composer:

```
composer require go2stone/filament-translatable
```

Add the plugin to your desired Filament panel:

```
use Go2Stone\FilamentTranslatable\Filament\Plugins\FilamentTranslatablePlugin;

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

You can specify the supported locales:

```
use Go2Stone\FilamentTranslatable\Filament\Plugins\FilamentTranslatablePlugin;

class FilamentPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                FilamentTranslatablePlugin::make()
                    ->supportedLocales([
                        'en' => 'English',
                        'nl' => 'Dutch',
                    ]),
            ]);
    }
}
```

Also you can specify localized tab labels PHP's locale\_get\_display\_name() function to set the labels of the tabs to the display name of the active language.

```
use Go2Stone\FilamentTranslatable\Filament\Plugins\FilamentTranslatablePlugin;

class FilamentPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                FilamentTranslatablePlugin::make()
                    ->supportedLocales([
                        'en' => 'English',
                        'nl' => 'Dutch',
                    ])
                    ->localeTabLabels(true),
            ]);
    }
}
```

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

### Combining with the official [spatie-laravel-translatable-plugin](https://github.com/filamentphp/spatie-laravel-translatable-plugin)?

[](#combining-with-the-official-spatie-laravel-translatable-plugin)

This package is a replacement for the official on the **create** and **edit** pages only. If you are already using the official package, you will have to delete the `use Translatable` trait and the `LocaleSwitcher` header action from those pages:

```
-use Filament\Actions\LocaleSwitcher;
-use Filament\Resources\Pages\EditRecord\Concerns\Translatable;

class EditPage extends EditRecord
{
-    use Translatable;

    protected function getHeaderActions(): array
    {
        return [
-            LocaleSwitcher::make(),
            DeleteAction::make(),
        ];
    }
}
```

Usage
-----

[](#usage)

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

```
use Filament\Forms\Components\TextInput;

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

Disable translations dynamically
--------------------------------

[](#disable-translations-dynamically)

If you want to disable translations dynamically, you can set the first parameter of the `->translatable()` function to `true` or `false`.

```
use Filament\Forms\Components\TextInput;

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

Overwrite locales
-----------------

[](#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', 'nl' => 'Dutch', 'fr' => 'French']),
```

Locale specific validation rules
--------------------------------

[](#locale-specific-validation-rules)

You can add locale specific validation rules with the third parameter of the `->translatable()` method.

```
use Filament\Forms\Components\TextInput;

TextInput::make('name')
    ->label('Name')
    ->translatable(true, null, [
        'en' => ['required', 'string', 'max:255'],
        'nl' => ['nullable', 'string', 'max:255'],
    ]);
```

or

```
use Filament\Forms\Components\TextInput;

TextInput::make('name')
    ->label('Name')
    ->translatable(localeSpecificRules: [
        'en' => ['required', 'string', 'max:255'],
        'nl' => ['nullable', 'string', 'max:255'],
    ]);
```

### Good to know

[](#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.

Laravel support
---------------

[](#laravel-support)

Laravel VersionPackage version^11.0^1.0.2, ^2.0.0^10.0^1.0.0, ^2.0.0Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Special Thanks to
-----------------

[](#special-thanks-to)

- [Simon Broekaert](https://github.com/SimonBroekaert)

License
-------

[](#license)

MIT License (MIT). Read the [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/655ffafa04de6ad2786f478c16e86111377cad1f83603ba6e3f8d16fab118d54?d=identicon)[vedatyilmaz](/maintainers/vedatyilmaz)

---

Top Contributors

[![vedatyilmaz](https://avatars.githubusercontent.com/u/4198651?v=4)](https://github.com/vedatyilmaz "vedatyilmaz (2 commits)")

### Embed Badge

![Health badge](/badges/go2stone-filament-translatable/health.svg)

```
[![Health](https://phpackages.com/badges/go2stone-filament-translatable/health.svg)](https://phpackages.com/packages/go2stone-filament-translatable)
```

###  Alternatives

[php-translation/translator

Translator services

25224.8k5](/packages/php-translation-translator)[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1926.6k1](/packages/smmoosavi-php-gettext)[laradevs/spanish

labels translated to spanish

166.7k](/packages/laradevs-spanish)

PHPackages © 2026

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