F
Filament•11mo ago
Prosp30

Changing default Save button and Create Another labels?

Hello there. I started learning Filament and I am building a small demo app to get a hang of it. I am loving it so far, had a few issues but managed to solve it. Only issue that I'm facing right now is how to change default action button labels, on the CreateRecord resource. I haven't found it in the docs (or I searched the wrong terms). Also, should I open an issue, because Croatian language translation is a bit off (not really in the spirit of the language). Actions are labeled: 1) Save - Napravi (literal translation would be Do it which sounds off) - more correct one would be Spremi 2) Save & Another - Napravi i napravi novi (sound off like in first point) - correct one would be Spremi i novi Thanks and apologies if it's a newbie question 🙂
Solution:
That’s totally valid. Or you could publish the translation files and change them there.
Jump to solution
3 Replies
awcodes
awcodes•11mo ago
Feel free to submit PRs to update the translations.
Prosp30
Prosp30OP•11mo ago
Thanks, I will submit it when I catch some time. What about changing those values and using custom ones? I managed to do it this way in the CreateRecord of the resource, is this wrong or I can do it like this? protected function getFormActions(): array { return [ $this->getCreateFormAction()->label('Spremi'), $this->getCreateAnotherFormAction()->label('Spremi i novi')->color('danger'), $this->getCancelFormAction()->label('Odustani'), ]; }
Solution
awcodes
awcodes•11mo ago
That’s totally valid. Or you could publish the translation files and change them there.
Want results from more Discord servers?
Add your server