F
Filament5mo ago
Tieme

Apply ->translateLabel() everywhere

Hi All, Is it possible to apply ->translateLabel() on every Entry/Column in Forms, Tabel and Infolist? I need to translate everything but don't want to add the field manual. I thought of overwriting the Trait and set the Boolean protected bool $shouldTranslateLabel = false; to true. But what i know it is not possible to overwrite Traits like Classes in Laravel. Any help would be appreciated. Thanks
Solution:
yes, use configureUsing in your provider ```php Field::configureUsing(function (Field $field) { $field->translateLabel();...
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreira5mo ago
yes, use configureUsing in your provider
Field::configureUsing(function (Field $field) {
$field->translateLabel();
});

Column::configureUsing(function (Column $column) {
$column->translateLabel();
});

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

Column::configureUsing(function (Column $column) {
$column->translateLabel();
});

Entry::configureUsing(function (Entry $entry) {
$entry->translateLabel();
});
Tieme
TiemeOP5mo ago
Totaly forgot about configureUsing]
Want results from more Discord servers?
Add your server