F
Filamentβ€’14mo ago
Uvays Aleroev

How to add LocaleSwitcher in RelationManager modal window?

if i add LocaleSwitcher as extra action it doesnt work full
->actions([
Tables\Actions\EditAction::make()
->extraModalFooterActions([
LocaleSwitcher::make(),
]),
Tables\Actions\DeleteAction::make(),
])
->actions([
Tables\Actions\EditAction::make()
->extraModalFooterActions([
LocaleSwitcher::make(),
]),
Tables\Actions\DeleteAction::make(),
])
if u switch locale form doesnt change, it only changes the title of the modal window πŸ˜„ how refresh filled form data when u change locale?
it doesnt refresh form translatable data
4 Replies
BKF Dev
BKF Devβ€’14mo ago
Hi @Answer Overflow did you find it ?
Uvays Aleroev
Uvays AleroevOPβ€’13mo ago
No
Exi
Exiβ€’13mo ago
I apologize for deviating from the original topic, but if you add to the required inputs in one language and the other languages are left empty, does it give an error for the other languages so the edit can be made? Are you experiencing this issue?
Majid Al Zariey
Majid Al Zarieyβ€’12mo ago
Its abit hard as you need to reload the page to get the new labels, you might consider reloading the page then opening the modal automaticlly. You might consider an approach where you use a custom switcher view as a live component, and each label of each component to update dynamically based on the switcher value (use Closure for that) , What would be abit challenging changing the layout if needed LTR or RTL
Want results from more Discord servers?
Add your server