F
Filamentβ€’7mo ago
HerrChris

Always translate all labels?

Is there a way to always translate all labels? I keep adding ->translateLabel() to everything but i am thinking there must be an easier way to do this. πŸ‘‹ to @Povilas K and #filament-daily πŸ˜„ Maybe this question will end up there!? ❀️
Solution:
I think you can use this ```php use Filament\Forms\Components\Field; use Filament\Tables\Columns\Column;...
Jump to solution
4 Replies
Solution
LeandroFerreira
LeandroFerreiraβ€’7mo ago
I think you can use this
use Filament\Forms\Components\Field;
use Filament\Tables\Columns\Column;
...

return $panel
->bootUsing(function () {

Field::configureUsing(function (Field $field) {
$field->translateLabel();
});

Column::configureUsing(function (Column $column) {
$column->translateLabel();
});
})
use Filament\Forms\Components\Field;
use Filament\Tables\Columns\Column;
...

return $panel
->bootUsing(function () {

Field::configureUsing(function (Field $field) {
$field->translateLabel();
});

Column::configureUsing(function (Column $column) {
$column->translateLabel();
});
})
or in the AppServiceProvider
HerrChris
HerrChrisOPβ€’7mo ago
Thanks for the quick response!
HerrChris
HerrChrisOPβ€’7mo ago
Thank you again! Also LOVE love LOVE this community πŸ™‚
Want results from more Discord servers?
Add your server