Replies: 4 comments 5 replies
-
Hello again, Resource Edit page emits locale change and relation manager listen to this, prepare data and handle update and creation of translatable related resource. So from user view - you have an edit page of resource with table with related records. You can switch language from EN to CS for example and related record opens popup editor in this current translation. app/Filament/Traits/TranslatableWithEmit.php - you should use this in edit pages (Filament/Resources/Pages/Edit.....php) instead of original Translatable trait
and app/Filament/Traits/HasTranslatableOwner.php
|
Beta Was this translation helpful? Give feedback.
-
Even after all of this still the listeners doesn't fire |
Beta Was this translation helpful? Give feedback.
-
The suggest work-around doesn't seem to work for me. Has there been any update regarding this issue in the meantime? |
Beta Was this translation helpful? Give feedback.
-
I just do it using Customizing data before filling the form: First, create a Component Tab with every tab for translation at form:
Then on actions of table function:
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I am working on solution, how to edit translatable fields in popup relation managers.
I made a trait, that emit event, when you switch language on resource page. This trait is used in Edit page (EditRecord).
And I made a second trait, that is used in RealationManager. This trait listen to "parents" event language change and prepare correct translated data before form fill. Handles updating and creation of record.
I will share this solution. I need to solve some stuff for now (show right data in Relation Manager table on Edit page).
Beta Was this translation helpful? Give feedback.
All reactions