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.
but he doesn't change the language.
5 Replies
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?!
I looked through the debugbar no, I didn't see anything special
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
__()
I didn't see anything specialWhat do you mean? Did you test whether those methods are actually called? And again: Did you provide a translation?
Solution
It's probably because he didn't use Discord formatting