PHPackages                             jeffersongoncalves/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. jeffersongoncalves/filament-translatable

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

jeffersongoncalves/filament-translatable
========================================

Enhanced Filament plugin for spatie/laravel-translatable with translation status indicators, locale flags, and improved DX.

v3.0.1(4mo ago)3202MITPHPPHP ^8.2

Since Feb 23Pushed 2mo agoCompare

[ Source](https://github.com/jeffersongoncalves/filament-translatable)[ Packagist](https://packagist.org/packages/jeffersongoncalves/filament-translatable)[ Docs](https://github.com/jeffersongoncalves/filament-translatable)[ GitHub Sponsors](https://github.com/jeffersongoncalves)[ RSS](/packages/jeffersongoncalves-filament-translatable/feed)WikiDiscussions 3.x Synced today

READMEChangelog (6)Dependencies (16)Versions (9)Used By (0)

[![Filament Translatable](https://raw.githubusercontent.com/jeffersongoncalves/filament-translatable/3.x/art/jeffersongoncalves-filament-translatable.png)](https://raw.githubusercontent.com/jeffersongoncalves/filament-translatable/3.x/art/jeffersongoncalves-filament-translatable.png)

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

[](#filament-translatable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ed1bf3879aa798567cd6c43abf76990135e0217c92c784dd91e8e2876834df56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/filament-translatable)[![Total Downloads](https://camo.githubusercontent.com/811ba7186407f9963099c7cc620e9c34f8c15f63b2084ce66f23a618e44c203d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/filament-translatable)[![License](https://camo.githubusercontent.com/e4441dba84aa5e7bfc6ed9bd6ff67d04dacc8d5cdefc34bc04e1732bfcee574c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Enhanced Filament plugin for [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable) with translation status indicators, locale flags, and improved developer experience.

Version Compatibility
---------------------

[](#version-compatibility)

BranchFilamentPHPLaravelTailwindLivewireInstall[1.x](https://github.com/jeffersongoncalves/filament-translatable/tree/1.x)v3^8.110+3.x3.x`"^1.0"`[2.x](https://github.com/jeffersongoncalves/filament-translatable/tree/2.x)v4^8.211+4.x3.x`"^2.0"`[3.x](https://github.com/jeffersongoncalves/filament-translatable/tree/3.x)v5^8.211.28+4.x4.x`"^3.0"`> You are viewing the documentation for **branch 3.x** (Filament v5).

Features
--------

[](#features)

- **Locale Switching** - Switch between locales on Create, Edit, List, View, and Manage pages
- **Translation Status Column** - Visual table column showing translation completeness per locale with colored badges
- **Translation Status Trait** - Introspect translation status (complete/partial/empty) and completeness percentage
- **Locale Flags** - Emoji flag support with configurable display (flag+label, flag only, label only)
- **Unified DX Trait** - `InteractsWithTranslations` for less boilerplate
- **SQLite Search** - JSON search support for SQLite (in addition to MySQL and PostgreSQL)
- **RelationManager Support** - Independent locale management for relation managers
- **30+ Built-in Flags** - Pre-configured emoji flags for the most common locales

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

[](#installation)

You can install the package via composer:

```
composer require jeffersongoncalves/filament-translatable:"^3.0"
```

Optionally publish the config:

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

Setup
-----

[](#setup)

### 1. Configure your Model

[](#1-configure-your-model)

Your model must use Spatie's `HasTranslations` trait:

```
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class Post extends Model
{
    use HasTranslations;

    protected $fillable = ['title', 'content', 'slug'];

    public array $translatable = ['title', 'content'];
}
```

Translatable columns must use `json` type in your migration:

```
Schema::create('posts', function (Blueprint $table) {
    $table->id();
    $table->json('title');
    $table->json('content');
    $table->string('slug'); // non-translatable fields use regular column types
    $table->timestamps();
});
```

### 2. Register the Plugin

[](#2-register-the-plugin)

Add the plugin to your `PanelProvider`:

```
use JeffersonGoncalves\FilamentTranslatable\FilamentTranslatablePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentTranslatablePlugin::make()
                ->defaultLocales(['en', 'pt_BR', 'es']),
        ]);
}
```

### 3. Add Translatable to your Resource

[](#3-add-translatable-to-your-resource)

```
use JeffersonGoncalves\FilamentTranslatable\Resources\Concerns\Translatable;

class PostResource extends Resource
{
    use Translatable;

    // ...
}
```

### 4. Add Translatable to Pages

[](#4-add-translatable-to-pages)

Each page type needs its own trait and the `LocaleSwitcher` header action:

```
use JeffersonGoncalves\FilamentTranslatable\Actions\LocaleSwitcher;
use JeffersonGoncalves\FilamentTranslatable\Resources\Pages\CreateRecord;
use JeffersonGoncalves\FilamentTranslatable\Resources\Pages\EditRecord;
use JeffersonGoncalves\FilamentTranslatable\Resources\Pages\ListRecords;

class CreatePost extends CreateRecord
{
    use CreateRecord\Concerns\Translatable;

    protected function getHeaderActions(): array
    {
        return [LocaleSwitcher::make()];
    }
}

class EditPost extends EditRecord
{
    use EditRecord\Concerns\Translatable;

    protected function getHeaderActions(): array
    {
        return [LocaleSwitcher::make()];
    }
}

class ListPosts extends ListRecords
{
    use ListRecords\Concerns\Translatable;

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

Additional page types are also supported:

```
use JeffersonGoncalves\FilamentTranslatable\Resources\Pages\ViewRecord;
use JeffersonGoncalves\FilamentTranslatable\Resources\Pages\ManageRecords;

// ViewRecord
class ViewPost extends ViewRecord
{
    use ViewRecord\Concerns\Translatable;

    protected function getHeaderActions(): array
    {
        return [LocaleSwitcher::make()];
    }
}

// ManageRecords (simple resource)
class ManagePosts extends ManageRecords
{
    use ManageRecords\Concerns\Translatable;

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

Translation Status Column
-------------------------

[](#translation-status-column)

Show translation completeness per locale in your table with colored badges:

```
use JeffersonGoncalves\FilamentTranslatable\Tables\Columns\TranslationStatusColumn;

public static function table(Table $table): Table
{
    return $table->columns([
        TextColumn::make('title'),
        TranslationStatusColumn::make('translations')
            ->showPercentage()    // show completion percentage
            ->onlyShowMissing()   // hide locales that are fully translated
            ->showFlags()         // show emoji flags next to locale labels
            ->locales(['en', 'pt_BR', 'es']), // override plugin locales
    ]);
}
```

Each locale displays a colored badge indicating its translation status:

- **Success** (green) - All translatable attributes are filled
- **Warning** (yellow) - Some translatable attributes are filled
- **Danger** (red) - No translatable attributes are filled

Translation Status Trait
------------------------

[](#translation-status-trait)

Use `HasTranslationStatus` on any page to check translation status programmatically:

```
use JeffersonGoncalves\FilamentTranslatable\Concerns\HasTranslationStatus;

class EditPost extends EditRecord
{
    use EditRecord\Concerns\Translatable;
    use HasTranslationStatus;
}
```

Available methods:

```
// Get status per locale: 'complete', 'partial', or 'empty'
$this->getTranslationStatus($record);
// => ['en' => 'complete', 'pt_BR' => 'partial', 'fr' => 'empty']

// Get completeness percentage per locale (0-100)
$this->getTranslationCompleteness($record);
// => ['en' => 100, 'pt_BR' => 50, 'fr' => 0]

// Get locales that have at least one translated attribute
$this->getTranslatedLocales($record);
// => ['en', 'pt_BR']
```

Locale Flags
------------

[](#locale-flags)

The plugin ships with 30+ built-in emoji flags. Configure them per locale in the plugin or via config:

```
FilamentTranslatablePlugin::make()
    ->defaultLocales(['en', 'pt_BR', 'es'])
    ->localeFlags([
        'en' => "\u{1F1FA}\u{1F1F8}",
        'pt_BR' => "\u{1F1E7}\u{1F1F7}",
        'es' => "\u{1F1EA}\u{1F1F8}",
    ])
    ->flagDisplay('flag_and_label'), // 'flag_and_label' | 'flag_only' | 'label_only'
```

Built-in flags include: `en`, `pt_BR`, `pt`, `es`, `fr`, `de`, `it`, `nl`, `ja`, `ko`, `zh`, `ru`, `ar`, `hi`, `tr`, `pl`, `uk`, `sv`, `da`, `no`, `fi`, `cs`, `el`, `ro`, `hu`, `th`, `vi`, `id`, `ms`, `he`.

Custom Locale Labels
--------------------

[](#custom-locale-labels)

Override how locale names are displayed:

```
FilamentTranslatablePlugin::make()
    ->defaultLocales(['en', 'pt_BR'])
    ->getLocaleLabelUsing(fn (string $locale) => match ($locale) {
        'en' => 'English',
        'pt_BR' => 'Portugues',
        default => null, // falls back to locale_get_display_name()
    }),
```

RelationManager
---------------

[](#relationmanager)

Relation managers have independent locale management using a dedicated `LocaleSwitcher`:

```
use JeffersonGoncalves\FilamentTranslatable\Resources\RelationManagers\Concerns\Translatable;
use JeffersonGoncalves\FilamentTranslatable\Tables\Actions\LocaleSwitcher;

class CommentsRelationManager extends RelationManager
{
    use Translatable;

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

> Note: Relation managers use `JeffersonGoncalves\FilamentTranslatable\Tables\Actions\LocaleSwitcher` (from `Tables\Actions`), while pages use `JeffersonGoncalves\FilamentTranslatable\Actions\LocaleSwitcher` (from `Actions`).

InteractsWithTranslations
-------------------------

[](#interactswithtranslations)

For less boilerplate, you can use the unified `InteractsWithTranslations` trait instead of page-specific traits:

```
use JeffersonGoncalves\FilamentTranslatable\Concerns\InteractsWithTranslations;

class EditPost extends EditRecord
{
    use InteractsWithTranslations;

    // Automatically detects the page type and provides
    // getTranslatableLocales() and locale management
}
```

Configuration
-------------

[](#configuration)

```
// config/filament-translatable.php

return [
    /*
    |--------------------------------------------------------------------------
    | Locale Flags
    |--------------------------------------------------------------------------
    |
    | Map of locale codes to emoji flags. Used by the LocaleSwitcher and
    | TranslationStatusColumn to display visual locale indicators.
    |
    */
    'locale_flags' => [
        'en' => "\u{1F1FA}\u{1F1F8}", // US
        'pt_BR' => "\u{1F1E7}\u{1F1F7}", // BR
        'es' => "\u{1F1EA}\u{1F1F8}", // ES
        'fr' => "\u{1F1EB}\u{1F1F7}", // FR
        'de' => "\u{1F1E9}\u{1F1EA}", // DE
        // ... 25+ more built-in
    ],

    /*
    |--------------------------------------------------------------------------
    | Flag Display Format
    |--------------------------------------------------------------------------
    |
    | Controls how locale labels are displayed in the LocaleSwitcher.
    | Options: 'flag_and_label', 'flag_only', 'label_only'
    |
    */
    'flag_display' => 'flag_and_label',

    /*
    |--------------------------------------------------------------------------
    | Translation Status Colors
    |--------------------------------------------------------------------------
    |
    | Filament color names used by the TranslationStatusColumn badges.
    |
    */
    'status_colors' => [
        'complete' => 'success',
        'partial' => 'warning',
        'empty' => 'danger',
    ],
];
```

Migration from `filament/spatie-laravel-translatable-plugin`
------------------------------------------------------------

[](#migration-from-filamentspatie-laravel-translatable-plugin)

This package is an enhanced fork of Filament's official translatable plugin. Migration is straightforward:

**1. Replace the package:**

```
composer remove filament/spatie-laravel-translatable-plugin
composer require jeffersongoncalves/filament-translatable:"^3.0"
```

**2. Update PanelProvider imports:**

```
// Before
use Filament\SpatieLaravelTranslatablePlugin;

// After
use JeffersonGoncalves\FilamentTranslatable\FilamentTranslatablePlugin;
```

**3. Update Resource and Page imports:**

Replace `Filament\Resources\` with `JeffersonGoncalves\FilamentTranslatable\Resources\` in all translatable traits.

**4. Update LocaleSwitcher imports:**

```
// Before
use Filament\Actions\LocaleSwitcher;

// After (for pages)
use JeffersonGoncalves\FilamentTranslatable\Actions\LocaleSwitcher;

// After (for relation managers)
use JeffersonGoncalves\FilamentTranslatable\Tables\Actions\LocaleSwitcher;
```

**5. Enjoy the new features** - Translation Status Column, locale flags, and status introspection are ready to use.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [Releases](https://github.com/jeffersongoncalves/filament-translatable/releases) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance83

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~13 days

Total

9

Last Release

69d ago

Major Versions

v1.0.0 → v2.0.02026-02-23

v2.0.0 → v3.0.02026-02-23

v2.0.1 → v3.0.12026-03-04

1.x-dev → 2.x-dev2026-04-26

2.x-dev → 3.x-dev2026-04-26

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (17 commits)")

---

Tags

filamentfilament-pluginfilament-v3filament-v4filament-v5i18nlaravellocalizationphpspatietranslatabletranslation-statusspatielaravellocalizationi18ntranslatablefilamentfilament-pluginjeffersongoncalvestranslation-status

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

284.5k1](/packages/finity-labs-fin-mail)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

274326.6k8](/packages/croustibat-filament-jobs-monitor)[bezhansalleh/filament-language-switch

Zero config Language Switch(Changer/Localizer) plugin for filamentphp admin

3581.3M28](/packages/bezhansalleh-filament-language-switch)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)

PHPackages © 2026

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