F
Filament9mo ago
hxnnxs

In some places, the language does not switch

Hello everyone, I use the plugin : https://filamentphp.com/plugins/bezhansalleh-language-switch. I want the language to change everywhere when switching, and I wrote the code for this : public static function getModelLabel() : string { return ('Contact'); } public static function getPluralModelLabel() : string { return ('Contacts'); } public static function getNavigationLabel(): string { return __('Contacts'); }
but he doesn't change the language.
No description
Solution:
It's probably because he didn't use Discord formatting
Jump to solution
5 Replies
Dennis Koch
Dennis Koch9mo ago
I doubt this is the plugins fault. It probably just sets the app language. Did you try debugging this? Are those methods called? Did you provide a translation?!
hxnnxs
hxnnxsOP9mo ago
I looked through the debugbar no, I didn't see anything special
Vp
Vp9mo ago
Maybe you don't have translation for Contacts in other language file.. I used this plugin and I don't have any problem I am not sure it's copy paste problem or not but your modelLabel and plural doesn't return __()
Dennis Koch
Dennis Koch9mo ago
I didn't see anything special
What do you mean? Did you test whether those methods are actually called? And again: Did you provide a translation?
Solution
Dennis Koch
Dennis Koch9mo ago
It's probably because he didn't use Discord formatting
Want results from more Discord servers?
Add your server