PHPackages                             fnx-software/filament-astrotomic - 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. fnx-software/filament-astrotomic

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

fnx-software/filament-astrotomic
================================

Filament support for Astrotomic's Laravel Translatable package.

v2.1.0(1w ago)4210↓76.9%2MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Sep 29Pushed 2mo agoCompare

[ Source](https://github.com/fnx-software/filament-astrotomic)[ Packagist](https://packagist.org/packages/fnx-software/filament-astrotomic)[ Docs](https://github.com/fnx-software/filament-astrotomic)[ RSS](/packages/fnx-software-filament-astrotomic/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (24)Versions (15)Used By (0)

Filament Astrotomic Translations
================================

[](#filament-astrotomic-translations)

[![Total Downloads](https://camo.githubusercontent.com/141ee420133c2c29e31b9cd3ff3c8d83f061d2fd441b7044de1c09e4af71ca4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666e782d736f6674776172652f66696c616d656e742d617374726f746f6d6963)](https://packagist.org/packages/fnx-software/filament-astrotomic)

This package is an extension for **Filament v5** and [laravel-translatable](https://docs.astrotomic.info/laravel-translatable) to easily manage multilingual content in your admin panel.

For **Filament v4**, use an older compatible release/tag.

This is an enhanced fork of [doriiaan/filament-astrotomic](https://github.com/Doriiaan/filament-astrotomic) and the original [cactus-galaxy/filament-astrotomic](https://github.com/CactusGalaxy/FilamentAstrotomic), updated for Filament 5 and introducing powerful new features like a reactive `LocaleSwitcher`, dedicated components for displaying translated content, and translated relationship selects with custom option labels.

[![CleanShot 2025-09-29 at 12 02 44@2x](https://private-user-images.githubusercontent.com/47450090/495086537-a2ef2b14-db7b-4d99-8fc9-dd30ed81a4a7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MDAyNzYsIm5iZiI6MTc4Mjg5OTk3NiwicGF0aCI6Ii80NzQ1MDA5MC80OTUwODY1MzctYTJlZjJiMTQtZGI3Yi00ZDk5LThmYzktZGQzMGVkODFhNGE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDA5NTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc4NWJjNmJmNTY2NmQwMzVjYmUyYmY3YmU3YTVhNDk1N2QyNDRlYzY4NTA2ZjVkYzNhN2ZkZTI2ODg1MzQwNDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.lmyZBkvr1z9Dvp3KvrvxOpXl0OxK-A52Qqw0GWn7kpo)](https://private-user-images.githubusercontent.com/47450090/495086537-a2ef2b14-db7b-4d99-8fc9-dd30ed81a4a7.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MDAyNzYsIm5iZiI6MTc4Mjg5OTk3NiwicGF0aCI6Ii80NzQ1MDA5MC80OTUwODY1MzctYTJlZjJiMTQtZGI3Yi00ZDk5LThmYzktZGQzMGVkODFhNGE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDA5NTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc4NWJjNmJmNTY2NmQwMzVjYmUyYmY3YmU3YTVhNDk1N2QyNDRlYzY4NTA2ZjVkYzNhN2ZkZTI2ODg1MzQwNDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.lmyZBkvr1z9Dvp3KvrvxOpXl0OxK-A52Qqw0GWn7kpo)Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require fnx-software/filament-astrotomic
```

Publish the configuration for `astrotomic/laravel-translatable`:

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

Configure the locales your app should use in `config/translatable.php`:

```
// config/translatable.php
'locales' => [
    'en',
    'es',
    'fr',
],
```

Setup
-----

[](#setup)

### Adding the Plugin to a Panel

[](#adding-the-plugin-to-a-panel)

Register the plugin in your Panel Provider:

```
// app/Providers/Filament/AdminPanelProvider.php

use Filament\Panel;
use Fnxsoftware\FilamentAstrotomic\FilamentAstrotomicPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentAstrotomicPlugin::make(),
        ]);
}
```

### Customizing the Main Locale

[](#customizing-the-main-locale)

By default, the main locale is taken from your `config/translatable.php` file. You can override this dynamically when registering the plugin.

Set a static main locale:

```
FilamentAstrotomicPlugin::make()
    ->mainLocale('ar')
```

Set a dynamic main locale:

```
use App\Models\Setting;

FilamentAstrotomicPlugin::make()
    ->mainLocale(fn () => Setting::where('key', 'default_locale')->first()?->value ?? 'en')
```

### Customizing the Available Locales

[](#customizing-the-available-locales)

By default, available locales are loaded from `config/translatable.php`.

You can override the locale list when registering the plugin. This is useful when locales are stored in a database, tenant settings, or any other runtime configuration.

```
FilamentAstrotomicPlugin::make()
    ->locales(['ar', 'en', 'fr'])
```

Basic Usage
-----------

[](#basic-usage)

### 1. Preparing Your Model

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

Make your Eloquent model translatable as described in the `astrotomic/laravel-translatable` documentation.

```
// app/Models/Post.php

use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
use Astrotomic\Translatable\Translatable;
use Illuminate\Database\Eloquent\Model;

class Post extends Model implements TranslatableContract
{
    use Translatable;

    public array $translatedAttributes = [
        'title',
        'content',
    ];

    protected $fillable = [
        'author_id',
    ];
}
```

### 2. Preparing Your Resource

[](#2-preparing-your-resource)

Apply the `ResourceTranslatable` trait to your Filament resource class:

```
// app/Filament/Resources/PostResource.php

use Filament\Resources\Resource;
use Fnxsoftware\FilamentAstrotomic\Resources\Concerns\ResourceTranslatable;

class PostResource extends Resource
{
    use ResourceTranslatable;

    // ...
}
```

### 3. Making Resource Pages Translatable

[](#3-making-resource-pages-translatable)

Apply the corresponding translatable trait to each resource page.

#### List Page

[](#list-page)

```
// app/Filament/Resources/PostResource/Pages/ListPosts.php

use Filament\Resources\Pages\ListRecords;
use Fnxsoftware\FilamentAstrotomic\Resources\Pages\ListTranslatable;

class ListPosts extends ListRecords
{
    use ListTranslatable;

    // ...
}
```

#### Create Page

[](#create-page)

```
// app/Filament/Resources/PostResource/Pages/CreatePost.php

use Filament\Resources\Pages\CreateRecord;
use Fnxsoftware\FilamentAstrotomic\Resources\Pages\CreateTranslatable;

class CreatePost extends CreateRecord
{
    use CreateTranslatable;

    // ...
}
```

#### Edit Page

[](#edit-page)

```
// app/Filament/Resources/PostResource/Pages/EditPost.php

use Filament\Resources\Pages\EditRecord;
use Fnxsoftware\FilamentAstrotomic\Resources\Pages\EditTranslatable;

class EditPost extends EditRecord
{
    use EditTranslatable;

    // ...
}
```

#### View Page

[](#view-page)

```
// app/Filament/Resources/PostResource/Pages/ViewPost.php

use Filament\Resources\Pages\ViewRecord;
use Fnxsoftware\FilamentAstrotomic\Resources\Pages\ViewTranslatable;

class ViewPost extends ViewRecord
{
    use ViewTranslatable;

    // ...
}
```

Form Components
---------------

[](#form-components)

### `TranslatableTabs` for Localized Fields

[](#translatabletabs-for-localized-fields)

To manage translations for your model's attributes, use the `TranslatableTabs` component. It automatically creates a tab for each locale.

```
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\TextInput;
use Fnxsoftware\FilamentAstrotomic\Schemas\Components\TranslatableTabs;
use Fnxsoftware\FilamentAstrotomic\TranslatableTab;

TranslatableTabs::make()
    ->localeTabSchema(fn (TranslatableTab $tab): array => [
        TextInput::make($tab->makeName('title'))
            ->required($tab->isMainLocale()),

        RichEditor::make($tab->makeName('content')),
    ])
```

[![CleanShot 2025-09-29 at 12 03 33@2x](https://private-user-images.githubusercontent.com/47450090/495086821-15c1f035-4997-476f-b249-16da8c007e48.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MDAyNzYsIm5iZiI6MTc4Mjg5OTk3NiwicGF0aCI6Ii80NzQ1MDA5MC80OTUwODY4MjEtMTVjMWYwMzUtNDk5Ny00NzZmLWIyNDktMTZkYThjMDA3ZTQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDA5NTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkNTllZGJlMmEwYTI2OTE5M2UyZTM2MWY2NTdjMTEwODlhMzkzMDcxYTgzZWE5YWNkYTBhMTY5YTQ3ZTg2MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.Vsr4vg97k5CQI9UDmen-6_4jhf7twvyfBpXaMNxsVvM)](https://private-user-images.githubusercontent.com/47450090/495086821-15c1f035-4997-476f-b249-16da8c007e48.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MDAyNzYsIm5iZiI6MTc4Mjg5OTk3NiwicGF0aCI6Ii80NzQ1MDA5MC80OTUwODY4MjEtMTVjMWYwMzUtNDk5Ny00NzZmLWIyNDktMTZkYThjMDA3ZTQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDA5NTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkNTllZGJlMmEwYTI2OTE5M2UyZTM2MWY2NTdjMTEwODlhMzkzMDcxYTgzZWE5YWNkYTBhMTY5YTQ3ZTg2MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.Vsr4vg97k5CQI9UDmen-6_4jhf7twvyfBpXaMNxsVvM)#### Customizing Field Labels

[](#customizing-field-labels)

Use `makePrefixLabel()` and `makeSuffixLabel()` on the `TranslatableTab` object to add the locale name to labels.

```
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Fnxsoftware\FilamentAstrotomic\Schemas\Components\TranslatableTabs;
use Fnxsoftware\FilamentAstrotomic\TranslatableTab;

TranslatableTabs::make()
    ->localeTabSchema(fn (TranslatableTab $tab): array => [
        TextInput::make($tab->makeName('title'))
            ->label($tab->makePrefixLabel('Title')),

        Textarea::make($tab->makeName('description'))
            ->label($tab->makeSuffixLabel('Description')),
    ])
```

#### Custom Locales Per `TranslatableTabs` Instance

[](#custom-locales-per-translatabletabs-instance)

By default, `TranslatableTabs` uses the locales configured for the plugin, or the `translatable.locales` config.

You can override locales for a specific form section:

```
use Filament\Forms\Components\TextInput;
use Fnxsoftware\FilamentAstrotomic\Schemas\Components\TranslatableTabs;
use Fnxsoftware\FilamentAstrotomic\TranslatableTab;

TranslatableTabs::make()
    ->customLocales(['ar', 'en', 'fr', 'pt'])
    ->localeTabSchema(fn (TranslatableTab $tab): array => [
        TextInput::make($tab->makeName('label'))
            ->required($tab->isMainLocale()),
    ])
```

`TranslatableSelect` for Relationships
--------------------------------------

[](#translatableselect-for-relationships)

The standard `Select::relationship()` component does not work reliably with `astrotomic/laravel-translatable` when the display attribute is translated.

For example, if the related model has a translated `name` attribute, the `name` column usually lives in the translation table, not the base table. This means a normal relationship select may try to select a missing column such as `countries.name`.

This package provides a `TranslatableSelect` component to correctly load, search, and display options from a translatable `BelongsTo` relationship.

```
use Fnxsoftware\FilamentAstrotomic\Schemas\Tables\TranslatableSelect;

TranslatableSelect::make('country_id')
    ->translatableRelationship('country', 'name')
    ->searchable()
    ->preload()
    ->label('Country')
    ->required();
```

This will display the translated country name in the current locale and search through the translated `name` attribute.

### Custom Translated Option Labels

[](#custom-translated-option-labels)

Sometimes the option label is not a single translated attribute. For example, a `Person` label may need to combine several translated fields:

```
first_name + father_name + last_name

```

Use `translatableLabelUsing()` to customize the displayed label.

```
use Fnxsoftware\FilamentAstrotomic\Schemas\Tables\TranslatableSelect;
use Modules\People\Models\Person;

TranslatableSelect::make('person_id')
    ->label('Person')
    ->translatableRelationship('person', 'first_name')
    ->translatableLabelUsing(fn (Person $record, string $locale): string => collect([
        $record->translate($locale)?->first_name,
        $record->translate($locale)?->father_name,
        $record->translate($locale)?->last_name,
    ])->filter()->implode(' ') ?: "#{$record->getKey()}")
    ->searchable()
    ->preload()
    ->required();
```

### Searching Multiple Translated Attributes

[](#searching-multiple-translated-attributes)

When using a custom label, you may also define multiple translated attributes to search.

```
use Fnxsoftware\FilamentAstrotomic\Schemas\Tables\TranslatableSelect;
use Modules\People\Models\Person;

TranslatableSelect::make('person_id')
    ->label('Person')
    ->translatableRelationship('person', 'first_name')
    ->translatableLabelUsing(fn (Person $record, string $locale): string => collect([
        $record->translate($locale)?->first_name,
        $record->translate($locale)?->father_name,
        $record->translate($locale)?->last_name,
    ])->filter()->implode(' ') ?: "#{$record->getKey()}")
    ->translatableSearchAttributes([
        'first_name',
        'father_name',
        'last_name',
    ])
    ->searchable()
    ->preload()
    ->required();
```

### Filtering or Ordering the Related Query

[](#filtering-or-ordering-the-related-query)

You may pass a query modifier as the third argument to `translatableRelationship()`.

```
TranslatableSelect::make('department_id')
    ->label('Department')
    ->translatableRelationship(
        relationship: 'department',
        titleAttribute: 'name',
        modifyQueryUsing: fn ($query) => $query
            ->where('active', true)
            ->orderBy('order'),
    )
    ->searchable()
    ->preload();
```

### Available Methods

[](#available-methods)

```
TranslatableSelect::make('person_id')
    ->translatableRelationship('person', 'first_name')
    ->translatableLabelUsing(fn ($record, string $locale): string => '...')
    ->translatableSearchAttributes([
        'first_name',
        'last_name',
    ]);
```

MethodDescription`translatableRelationship(string $relationship, string $titleAttribute, ?Closure $modifyQueryUsing = null)`Defines the related model relationship and fallback translated display attribute.`translatableLabelUsing(?Closure $callback)`Customizes the option label using the related record and active locale.`translatableSearchAttributes(array $attributes)`Defines one or more translated or base-table attributes to search.Displaying Translated Content Reactively
----------------------------------------

[](#displaying-translated-content-reactively)

This package provides a seamless way to view translated content on List and View pages using a `LocaleSwitcher` action that works with dedicated table columns and infolist entries.

### 1. Add the `LocaleSwitcher` Action

[](#1-add-the-localeswitcher-action)

Add the `LocaleSwitcher` to the header actions of your List and View pages.

```
// In your List page, for example ListPosts.php

use Filament\Actions\CreateAction;
use Fnxsoftware\FilamentAstrotomic\Actions\LocaleSwitcher;

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

[![CleanShot 2025-09-29 at 12 04 48@2x](https://private-user-images.githubusercontent.com/47450090/495087410-a59f0fa7-4709-483e-bda6-3e3a9604ad0b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MDAyNzYsIm5iZiI6MTc4Mjg5OTk3NiwicGF0aCI6Ii80NzQ1MDA5MC80OTUwODc0MTAtYTU5ZjBmYTctNDcwOS00ODNlLWJkYTYtM2UzYTk2MDRhZDBiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDA5NTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkwNmQ1OTU3ODc1ZDcwNTczNjY5NjQ4M2M1OTBjOTdhNTcwZmRmMDYyNzUwNzI3ZTEzMWU5OTk2YTk2NWU2MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.-LnvjS0rjMTAidy0bACOD15g2LZvIJfEhMyz4ZHxxzI)](https://private-user-images.githubusercontent.com/47450090/495087410-a59f0fa7-4709-483e-bda6-3e3a9604ad0b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5MDAyNzYsIm5iZiI6MTc4Mjg5OTk3NiwicGF0aCI6Ii80NzQ1MDA5MC80OTUwODc0MTAtYTU5ZjBmYTctNDcwOS00ODNlLWJkYTYtM2UzYTk2MDRhZDBiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAxVDA5NTkzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkwNmQ1OTU3ODc1ZDcwNTczNjY5NjQ4M2M1OTBjOTdhNTcwZmRmMDYyNzUwNzI3ZTEzMWU5OTk2YTk2NWU2MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.-LnvjS0rjMTAidy0bACOD15g2LZvIJfEhMyz4ZHxxzI)### 2. Use `TranslatableColumn` in Tables

[](#2-use-translatablecolumn-in-tables)

The `TranslatableColumn` automatically displays the translation for the selected locale and provides out-of-the-box search and sort functionality.

```
use Filament\Tables\Table;
use Fnxsoftware\FilamentAstrotomic\Tables\Columns\TranslatableColumn;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            TranslatableColumn::make('title')
                ->searchable()
                ->sortable(),
        ]);
}
```

### 3. Use `TranslatableEntry` in Infolists

[](#3-use-translatableentry-in-infolists)

Use `TranslatableEntry` in infolists to display translated content that reacts to the `LocaleSwitcher`.

```
use Filament\Infolists\Infolist;
use Fnxsoftware\FilamentAstrotomic\Infolists\Components\TranslatableEntry;

public static function infolist(Infolist $infolist): Infolist
{
    return $infolist
        ->schema([
            TranslatableEntry::make('title'),
            TranslatableEntry::make('content'),
        ]);
}
```

Single Locale Optimization &amp; Customization
----------------------------------------------

[](#single-locale-optimization--customization)

### Automatic Grid View

[](#automatic-grid-view)

When your application or a specific tenant only has one locale active, `TranslatableTabs` automatically switches its layout to a standard grid.

This removes the unnecessary tab bar and renders fields directly. It gives a cleaner UI for single-language contexts without requiring code changes.

### Forcing Tabs Layout

[](#forcing-tabs-layout)

If you prefer to always show language tabs, even when only one locale is available, you can force the layout globally or per component.

#### Global Configuration

[](#global-configuration)

```
use Fnxsoftware\FilamentAstrotomic\FilamentAstrotomicPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(
            FilamentAstrotomicPlugin::make()
                ->force()
        );
}
```

#### Per-Component Configuration

[](#per-component-configuration)

```
use Fnxsoftware\FilamentAstrotomic\Schemas\Components\TranslatableTabs;

TranslatableTabs::make('translations')
    ->force()
    ->localeTabSchema(fn (TranslatableTab $tab): array => [
        // ...
    ])
```

Custom Locales for Switcher
---------------------------

[](#custom-locales-for-switcher)

You can define specific locales for the `LocaleSwitcher` action, overriding global or tenant configuration.

```
use Fnxsoftware\FilamentAstrotomic\Actions\LocaleSwitcher;

LocaleSwitcher::make()
    ->locales(['en', 'fr']);

LocaleSwitcher::make()
    ->locales([
        'en' => 'English (US)',
        'fr' => 'Français (France)',
    ]);
```

Advanced Usage
--------------

[](#advanced-usage)

### Custom Locales Per Resource

[](#custom-locales-per-resource)

Override `getTranslatableLocales()` in your resource to specify a different set of locales than the global configuration.

```
public static function getTranslatableLocales(): array
{
    return ['en', 'fr'];
}
```

### Modal Forms

[](#modal-forms)

To use translatable fields inside modal actions, such as an `EditAction` on a table row, you must correctly mutate the data.

```
use App\Models\Post;
use Filament\Tables\Actions\EditAction;

->actions([
    EditAction::make()
        ->mutateRecordDataUsing(function (Post $record, array $data): array {
            return static::mutateTranslatableData($record, $data);
        }),
])
```

### Nested Relationship Support

[](#nested-relationship-support)

`TranslatableColumn` and `TranslatableEntry` support displaying translated attributes on nested relationships using dot notation.

Search support is available for relationship paths handled by the component.

Sorting support is currently limited and should be considered supported for direct attributes and simple relationship cases only.

#### `TranslatableColumn` with a Relationship

[](#translatablecolumn-with-a-relationship)

```
use Fnxsoftware\FilamentAstrotomic\Tables\Columns\TranslatableColumn;

TranslatableColumn::make('country.name')
    ->label('Country')
    ->searchable()
    ->sortable();
```

#### `TranslatableEntry` with a Relationship

[](#translatableentry-with-a-relationship)

```
use Fnxsoftware\FilamentAstrotomic\Infolists\Components\TranslatableEntry;

TranslatableEntry::make('country.name')
    ->label('Country');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- **Original Author:** [Oleksandr Moik (cactus-galaxy)](https://github.com/oleksandr-moik)
- **Filament v4 Fork:** [Alary Dorian (Doriiaan)](https://github.com/Doriiaan)
- **Current Maintainer:** [Fnx-Software](https://github.com/fnx-software)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance79

Regular maintenance activity

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~20 days

Recently: every ~40 days

Total

14

Last Release

9d ago

Major Versions

v1.2.8 → v2.0.02026-02-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/c75d8af0e7bddaa35fff99131dacab0e1a75da375972ca67a8e81b99ba40a57b?d=identicon)[mstfkhazaal](/maintainers/mstfkhazaal)

---

Top Contributors

[![mstfkhazaal](https://avatars.githubusercontent.com/u/47450090?v=4)](https://github.com/mstfkhazaal "mstfkhazaal (61 commits)")

---

Tags

astrotomicfilamentfilament-pluginfilament4filamentphplaravellaravel-translatablelocalizationmultilingualtranslationslaraveltranslationslaravel-translatabletranslatablefilamentastrotomicfilament-astrotomicFenixSoftwarefnx-softwarefilamentastrotomic

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fnx-software-filament-astrotomic/health.svg)

```
[![Health](https://phpackages.com/badges/fnx-software-filament-astrotomic/health.svg)](https://phpackages.com/packages/fnx-software-filament-astrotomic)
```

###  Alternatives

[cactus-galaxy/filament-astrotomic

Filament support for Astrotomic's Laravel Translatable package.

2518.0k](/packages/cactus-galaxy-filament-astrotomic)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[relaticle/flowforge

Flowforge is a lightweight Kanban board package for Filament that works with existing Eloquent models.

413106.5k5](/packages/relaticle-flowforge)[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)
