F
Filament2y ago
Vp

brand logo translateable in html title

By default, Filament will use your app's name as a brand logo in the admin panel. Using this link https://filamentphp.com/docs/2.x/admin/appearance#changing-the-brand-logo I can change my brand to translateable, but how can I change title?
Filament
Appearance - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
6 Replies
Vp
VpOP2y ago
I publish base.blade.php and change the title and it can change, not sure is this correct approach.. I wonder is there an easy and correct way
Patrick Boivin
You can set the config dynamically in AppServiceProvider :
public function boot(): void
{
// ...

config()->set('filament.brand', __('My Brand'));
}
public function boot(): void
{
// ...

config()->set('filament.brand', __('My Brand'));
}
Vp
VpOP2y ago
This work on initial, but cannot update after changing language
Patrick Boivin
Did you add it to your translations? In lang/...
Vp
VpOP2y ago
Of course, but it cannot change.. I am using https://github.com/bezhanSalleh/filament-language-switch plugin
GitHub
GitHub - bezhanSalleh/filament-language-switch: Zero config Languag...
Zero config Language Switch(Changer/Localizer) plugin for Filamentphp Admin - GitHub - bezhanSalleh/filament-language-switch: Zero config Language Switch(Changer/Localizer) plugin for Filamentphp A...
Patrick Boivin
Ok, I'm not familiar with this plugin... I'm using a simple Select in my user profile page so people can set their preferred locale. The code above seems to work for me.

Did you find this page helpful?