Closed malozaibi closed 8 months ago
I have this in my improvement plans, but I can do something for now.
Tagged v2.0.6. Now, you can use ->language(fn ($livewire) => $livewire->activeLocale)
, and the editor interface will change related to the language chosen from LocaleSwitcher.
Tagged v2.0.6. Now, you can use
->language(fn ($livewire) => $livewire->activeLocale)
, and the editor interface will change related to the language chosen from LocaleSwitcher.
It is solved. Thank you very much.
You're welcome
What happened?
I use spatie-laravel-translatable-plugin that is responsible for language translations. I use Arabic (RTL) and English (LTR).
However the direction stays same as the Layout language not the language of the translation package.
How to reproduce the bug
use spatie-laravel-translatable-plugin make model field translatable by the spatie laravel package use ar and en for the package
use TinyEditor in the form fields for the translatable field change the language using the LocaleSwitcher action button
direction doesn't change for ar or en. It just keeps as the Panel Layout language direction.
Package Version
2.0
PHP Version
8.1
Laravel Version
10
Which operating systems does with happen with?
macOS
Notes
I used to use Voyager Admin Panel and I override the directionality: 'rtl | ltr' using js when the language change and rebuild the tinyMCE editor on every click to language switcher. However filament uses A different world with livewire and alpine witch I find harder to customize (for now at least).
Thank you.