F
Filament7mo ago
Dom

Is Spatie Translatable plugin compatible with filament custom pages?

When I try to fill the form with the translated json data on my custom page, it dumps all of the json in my input field. As you can see in the picture, I'm trying to use it as I would in a resource.
No description
No description
2 Replies
Dan Harrin
Dan Harrin7mo ago
the translatable plugin is for translating resources it doesnt know how to deal with your custom page structure but since you have full control over the data that gets put into your custom form, you can probably do that bit yourself to construct the array
Lara Zeus
Lara Zeus7mo ago
you can use this package https://github.com/lara-zeus/chaos it include a multi lang component but for text input only or take a look how its working and use it in your page: https://github.com/lara-zeus/chaos/blob/1.x/src/Forms/Components/MultiLang.php
Want results from more Discord servers?
Add your server