Display all translations
Howdy, is there a way to display all translations used by a model using the Spatie Translatable plugin?
Like, if I have a
name
column, and it gets translated to 4 languages.
How would I go about displaying all 4 languages at the same time, rather than having to edit, save, swap language, edit, save, etc.?Solution:Jump to solution
Turns out https://filamentphp.com/plugins/mvenghaus-translatable-inline exists, and is perfect for my usecase.
Filament
Translatable Inline by Marcus Venghaus - Filament
Addon for Spatie Translatable Plugin to edit translations directly below the field
2 Replies
Would I have to do a loop based on the languages used, to output the amount of TextInputs for each thing?
So far I've got this:
And while it does make the fields for each of my locales, for some reason the translation obtained is the one for my applanguage, not the locale we're currently on in the loop. I'm quite confused as to why that'd be the case.
Solution
Turns out https://filamentphp.com/plugins/mvenghaus-translatable-inline exists, and is perfect for my usecase.
Filament
Translatable Inline by Marcus Venghaus - Filament
Addon for Spatie Translatable Plugin to edit translations directly below the field