devecommercepl/filament-translate-resource-labels

Filament plugin for translating resource labels

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/devecommercepl/filament-translate-resource-labels

1.0.1 2025-11-13 11:32 UTC

This package is auto-updated.

Last update: 2025-11-13 11:37:01 UTC


README

This plugin allows you to translate resource labels in Filament automatically using your language files. It searches for a translation key in the language files using the model name and component name.

Example usage:

UserResource.php

public function form(Form $form): Form {
    return $form
        ->schema([
            TextInput::make('name'),
        ]);
}

lang/en/user.php

<?php

return [
    'name' => 'Customer name',
];

Installation

  1. Install the package via composer:

    composer require nodium/filament-translate-resource-labels
  2. Register plugin in your panel:

    use DevEcommercePL\FilamentTranslateResourceLabels\TranslateResourceLabelsPlugin;
    
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugins([
                TranslateResourceLabelsPlugin::make()
            ])
    }

Testing

composer test

Docker users:

You can bootstrap docker test environment and run the tests easily using the following commands:

make build
make test CMD="composer test"

License

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