PHPackages                             34ml/filament-translatable-field - 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. 34ml/filament-translatable-field

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

34ml/filament-translatable-field
================================

A laravel filament field that handle translation

v2.1.2(3mo ago)193.2k—1.8%1MITPHPPHP ^8.3

Since May 29Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/34ML/Filament-Translatable-Field)[ Packagist](https://packagist.org/packages/34ml/filament-translatable-field)[ Docs](https://github.com/34ml/filament-translatable-field)[ RSS](/packages/34ml-filament-translatable-field/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (32)Versions (32)Used By (0)

A filament field that handles translations
==========================================

[](#a-filament-field-that-handles-translations)

[![translatableFieldHeader](https://raw.githubusercontent.com/34ML/Filament-Translatable-Field/main/resources/images/Filament-Translatable-Field.jpg)](https://raw.githubusercontent.com/34ML/Filament-Translatable-Field/main/resources/images/Filament-Translatable-Field.jpg)

This package enables you to implement the following:

1. Render a language selector to change the localized field
2. You can save your localized fields data in one click
3. You can use it in your relationship manager to show the localized fields

[![translatableField](https://raw.githubusercontent.com/34ML/Filament-Translatable-Field/main/resources/images/FullComponent.png)](https://raw.githubusercontent.com/34ML/Filament-Translatable-Field/main/resources/images/FullComponent.png)

***This package depends on [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable), Please check it first to set up your translation logic in your project.***

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

[](#installation)

You can install the package via composer:

```
composer require 34ml/filament-translatable-field
```

You can publish the config file with:

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

This is the content of the published config file where fields are created for each language listed here

```
return [
    'locales' => [
        'en' => 'English',
        'ar' => 'Arabic',
    ],
    'select_translation_field_name' => 'select_language',
];
```

Translatable Field Usage
------------------------

[](#translatable-field-usage)

### Basic Usage

[](#basic-usage)

- Just add the field in your resource, view, create,or edit pages inside the form function

```
 ..._34ML\FilamentTranslatableField::make(
     'your_translatable_field_name',
     \Filament\Forms\Components\TextInput::class, // The field type class
)
```

- If you want to customize the label of the field

```
 ..._34ML\FilamentTranslatableField::make(
     'your_translatable_field_name',
     \Filament\Forms\Components\TextInput::class, // The field type class
     'your_field_displayed_name', // Optional
)
```

- If you want to add filament field functions

```
  ..._34ML\FilamentTranslatableField::make(
     'your_translatable_field_name',
     \Filament\Forms\Components\TextInput::class, // The field type class
    // add your filament field functions as a callback, you can add it as one function
    callbacks: function (){
        $this->required();
        $this->numeric();
        return $this; // You have to return the field or the callbacks won't work
    }
)
```

### Language Selector

[](#language-selector)

If you want to add a language selector that shows only the selected language's fields instead of showing all fields you can simply add this field in your resource, view, create,or edit pages inside the form function

```
use _34ML\FilamentTranslatableField\Forms\Components\LanguageSelector;

return $form
           ->schema([
               LanguageSelector::make(),
                ]);
```

Relationship Manager
--------------------

[](#relationship-manager)

you need to add this code to your relationship manager

```
    public static function getRecordTitle(?Model $record): ?string
    {
        return $record->getTranslation('your_title_column', config('filament-translatable-field.locales')[0]);
    }
```

Credits
-------

[](#credits)

- [Mostafa Hassan](https://github.com/MostafaHassan1)
- [Reham Mourad](https://github.com/RehamMourad)
- [Ahmed Essam](https://github.com/aessam13)

License
-------

[](#license)

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

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~103 days

Total

22

Last Release

94d ago

Major Versions

v1.1.5 → v2.0.02023-10-23

PHP version history (3 changes)1.0.0PHP ^8.1

v2.0.3PHP ^8.1 | ^8.2

v2.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7489e0695a574d6e6102a9545bd8a114581df7968b852938ed11b4f6519e6e24?d=identicon)[admin34ML](/maintainers/admin34ML)

---

Top Contributors

[![aessam13](https://avatars.githubusercontent.com/u/78547437?v=4)](https://github.com/aessam13 "aessam13 (19 commits)")[![AWahba2](https://avatars.githubusercontent.com/u/158474319?v=4)](https://github.com/AWahba2 "AWahba2 (5 commits)")[![MostafaHassan1](https://avatars.githubusercontent.com/u/42083130?v=4)](https://github.com/MostafaHassan1 "MostafaHassan1 (3 commits)")[![nasser34ml](https://avatars.githubusercontent.com/u/98050360?v=4)](https://github.com/nasser34ml "nasser34ml (3 commits)")[![AWahba1](https://avatars.githubusercontent.com/u/87873253?v=4)](https://github.com/AWahba1 "AWahba1 (3 commits)")[![y-shaker](https://avatars.githubusercontent.com/u/101970164?v=4)](https://github.com/y-shaker "y-shaker (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![RehamMourad](https://avatars.githubusercontent.com/u/116159078?v=4)](https://github.com/RehamMourad "RehamMourad (1 commits)")

---

Tags

laravel34MLfilament-translatable-field

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/34ml-filament-translatable-field/health.svg)

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

###  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)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3891.8k](/packages/codewithdennis-larament)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)

PHPackages © 2026

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