© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Jessy

how to translate the option in a Select?

Forms\Components\Select::make('website_type_id')
      ->label(__('Type'))
      ->options(WebsiteType::all()->pluck('name', 'id'))
      ->required(),
Forms\Components\Select::make('website_type_id')
      ->label(__('Type'))
      ->options(WebsiteType::all()->pluck('name', 'id'))
      ->required(),

I tried : ->options((WebsiteType::all()->pluck( ('name')), 'id')), but doesn't work.
Solution
You need to
->map()
->map()
your names to the translated names.
Jump to solution
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

How to access to the selected option in the SelectFilter?
FilamentFFilament / ❓┊help
3y ago
How to translate select values
FilamentFFilament / ❓┊help
16mo ago
Prevent select option re-rendering in SelectInput
FilamentFFilament / ❓┊help
3y ago
Repeater remove selected option in a select
FilamentFFilament / ❓┊help
3y ago