F
Filamentβ€’11mo ago
BlackShadow

Translations sub-navigation pages

I chose to use sub-navigation menus, but I'm struggling to translate the model label. It worked fine in a regular relationship manager, but here it only shows as "Question answer" or "Question answers."
No description
Solution:
Seems like ->modelLabel('Your label here') works. β˜‘οΈ
Jump to solution
12 Replies
Sjoerd24
Sjoerd24β€’11mo ago
With ->emptyStateHeading(__('No question answers')) you can fix sth like that on the table dank voor je super plugin trouwens, mega praktisch in mijn project.. πŸ˜‰
BlackShadow
BlackShadowOPβ€’11mo ago
This would work but it would be perfect if i could use "translate" the model label part. (Which is possible on relation manager) πŸ’™
Solution
BlackShadow
BlackShadowβ€’11mo ago
Seems like ->modelLabel('Your label here') works. β˜‘οΈ
Sjoerd24
Sjoerd24β€’11mo ago
Ah die kende ik ook nog niet! Betere oplossing idd.
Vp
Vpβ€’11mo ago
@CodeWithDennis sorry for tagging, but where did you put ->modelLabel() for translation
BlackShadow
BlackShadowOPβ€’11mo ago
On the table. There is also a plural method.
Vp
Vpβ€’11mo ago
Oh this question is about table empty state right?
BlackShadow
BlackShadowOPβ€’11mo ago
Also the button
Vp
Vpβ€’11mo ago
I want this part
No description
Vp
Vpβ€’11mo ago
for translation
BlackShadow
BlackShadowOPβ€’11mo ago
public static function getNavigationLabel(): string
public static function getNavigationLabel(): string
in view file
Vp
Vpβ€’11mo ago
Working fine.. thanks
Want results from more Discord servers?
Add your server