New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use trans in panel config after upgrade #7604
Comments
|
As you came from 3.0.8, I can confirm this starts with 3.0.14. Downgrading to 3.0.13 fixes it. |
|
I had a similar issue- solved by using a closure |
|
@howdu how about this ->navigationGroups([
__('Courses'),
__('Blog'),
__('Forum'),
__('Administration'),
]) |
|
Use the full class ->navigationGroups([
NavigationGroup::make()
->label(fn () => __('Example'))
->collapsible(),
NavigationGroup::make()
->label(fn () => __('Example'))
->collapsible(),
]) |
|
It works btw I don't think this is a good way to solve this issue |
|
Correct me if I'm wrong. In 3.0.13, using |
|
ok, you're right. before v3.0.13 translate takes no effect without closure function. |
|
So this is probably a good error lol. It was kinda a coincidence that it worked before. There is no way to access the locale from a service provider, as it is run before middleware. |
Hi!, same issue as mine, using filament It is working on this: ->navigationItems([
NavigationItem::make('API Documentation')
->group(fn () => trans('Documentation'))But this is not working ->navigationGroups([
fn () => trans('Documentation'),
])is there any wrong on my setup? hope can fix this |
My bad, there is a way ->navigationGroups([
NavigationGroup::make()
->label( fn () => trans('Documentation')), |
|
I'm forcing my filament language to english with this code in
...which also results in |
|
Should be fixed by #7661 |
|
I have same issue using v3.0.36 |


Package
filament/filament
Package Version
v3.0.14
Laravel Version
v10.18.0
Livewire Version
No response
PHP Version
PHP 8.2
Problem description
Cannot use translation in panel config after upgrade from
v3.0.8tov3.0.14->userMenuItems([ MenuItem::make() ->label(__('My Profile')) // error right here ->url(fn () => Profile::getUrl()) ->icon('heroicon-o-user-circle'), ]);Expected behavior
works
Steps to reproduce
Use
trans()or__()in admin panel serviceReproduction repository
https://github.com/datlechin/filament
Relevant log output
No response
The text was updated successfully, but these errors were encountered: