F
Filament4mo ago
Trasek

Filament Shield Languages

I have published the translations with the appropriate code i.e:
php artisan vendor:publish --tag="filament-shield-translations’
php artisan vendor:publish --tag="filament-shield-translations’
But after changing to a different language I only get rules e.g.
Filament-shield::filament-shield.resource.label.roles
Filament-shield::filament-shield.resource.label.roles
There are no translations. Anyone had a similar problem?
Solution:
it was filament_shield.php but it's need to be filament-shield.php
Jump to solution
5 Replies
Dennis Koch
Dennis Koch4mo ago
Did you remove any of the language files?
Trasek
TrasekOP4mo ago
@Dennis Koch no i can remove filament-shield folder and publish languages again from lang folder. I've try to remove function from RoleResource.php to check the error with icon in polish language.
public static function getNavigationIcon(): string
{
return __('filament-shield::filament-shield.nav.role.icon');
}
public static function getNavigationIcon(): string
{
return __('filament-shield::filament-shield.nav.role.icon');
}
But it is unlikely to have an impact for this.
Dennis Koch
Dennis Koch4mo ago
Wait. Did the translation work before publishing the translation files? Or are they just missing for your language?
Trasek
TrasekOP4mo ago
Translations are available for my language. There is an error with the icon in my language:
Svg by name "filament-shield::filament-shield.nav.role.icon" from set "default" not found.
Svg by name "filament-shield::filament-shield.nav.role.icon" from set "default" not found.
I tried to change the icon in the translation but unfortunately the icon does not change, still the same error. After removing the function in the vendor that handles this icon, the translation does not load. It looks as if they do not load in Polish (pl) from the beginning. lol the problem is with filename...
Solution
Trasek
Trasek4mo ago
it was filament_shield.php but it's need to be filament-shield.php
Want results from more Discord servers?
Add your server