How to place language switcher outside of panel
I am trying to place the language switcher outside of my panel with but that does not work.
I am using https://github.com/bezhanSalleh/filament-language-switch
Maybe someone knows how to do this?
GitHub
GitHub - bezhanSalleh/filament-language-switch: A versatile and use...
A versatile and user-friendly plugin designed for Filament Panels. - bezhanSalleh/filament-language-switch
22 Replies
This is what I get
Best to ask in the plugin channel #bezhansalleh-language-switch
You did see the docs about this?https://github.com/bezhanSalleh/filament-language-switch?tab=readme-ov-file#outside-panel-routes
GitHub
GitHub - bezhanSalleh/filament-language-switch: A versatile and use...
A versatile and user-friendly plugin designed for Filament Panels. - bezhanSalleh/filament-language-switch
And also the note about themes?
https://github.com/bezhanSalleh/filament-language-switch?tab=readme-ov-file#theme
GitHub
GitHub - bezhanSalleh/filament-language-switch: A versatile and use...
A versatile and user-friendly plugin designed for Filament Panels. - bezhanSalleh/filament-language-switch
Thanks you for you answer I will have a look. Yes I asked about it in the plugin channel
No answer until now
Tried that already but I dont know how that should work
Checked the Channel. Bezhan is not at his computer until 20th May.
Which part you don't understand?
And I guess your issue comes from not having a theme?
I dont understand the theming part.
I added my custom route
and updated my tailwind config
Wait. Since you are using this outside the panel, that doesn't 100% apply to you. But you have a separate Tailwind config for your "outside panel" page? And you recompiled your CSS?
My tailwind config is in root, yes also recompiled
Hm. I don't know the plugin so I can't help much. I'd say: Check the output HTML and see whether the classes that are used are actually included in your Tailwind build.
Thanks for your help
Is your "outside panel" project using Livewire? The plugin assumes you have AlpineJS. Maybe you have a error in your Devtools console
Its always collapsed
If I click the button I get
and I can't switch languages
No removed it like it is stated in the filament docs
livewire.js?id=770f7738:1123 Alpine Expression Error: $refs.panel.toggle is not a function
You removed it from Composer but not from the project, right?
I can't find any code related to this inside the plugin. Are you sure the error is coming from the plugin?
It ships with filament
What I did so far
Added that to my blade
tailwind config
added custom page
Is the error coming from the plugin? Or is it already there before you add it?
The error appears after clicking the button
The switcher button
Btw: Why are you including a Livewire component? I can't find that on the readme?
Found that in thread here didn't know how to do it otherwise
I guess "outside panel" means for guest pages and not for "non-filament" pages.
Ahh ok! Thanks how could I do it then? Any idea? Would be so grateful
Not sure whether that's right. Just my feeling.
You probably need to build this yourself then.
Ok thank you