© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Dionysis

Dynamically translate labels using configureUsing by adding a new translatable label

I am in the process of translating an application into Greek. The translation is straightforward for most parts, but problems arise when translating labels that reference a model. For instance, in translating a create button, I typically have to visit each create button, assign a custom label alo ng with a page title, and then add these to the corresponding language JSON file. I attempted to dynamically change labels using
configureUsing()
configureUsing()
, with code like
$action->label("Create {$action->getModelLabel()}")
$action->label("Create {$action->getModelLabel()}")
. However, this approach fails because
getModelLabel()
getModelLabel()
cannot be used at that point, as the action is not yet initialised.

Is there any way to accomplish this without going through each action, title, modal heading, since the code will be repeatable and will look bloated?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Translate resource label
FilamentFFilament / ❓┊help
2y ago
translate label needed
FilamentFFilament / ❓┊help
3y ago
translate navigation label
FilamentFFilament / ❓┊help
3y ago
Always translate all labels?
FilamentFFilament / ❓┊help
2y ago