F
Filament2mo ago
Ryco

How to translate buttons?

Hello, i would like to know of its possible to translate those buttons. I use this for changing languages. https://filamentphp.com/plugins/bezhansalleh-language-switch
Filament
Language Switch by Bezhan Salleh - Filament
A versatile and user-friendly Locale/Language Switch designed for Filament Panels.
No description
Solution:
Yes. Japanese locale code is ja not jpn
Jump to solution
29 Replies
Ryco
RycoOP2mo ago
And also those texts i want them transated:
No description
Ryco
RycoOP2mo ago
I'm not sure how do i do that.
Dennis Koch
Dennis Koch2mo ago
Those are all generated from modelLabel and pluralModelLabel https://filamentphp.com/docs/4.x/resources/overview#customizing-the-model-label
Ryco
RycoOP2mo ago
Yep, found it already. But what about those:
Ryco
RycoOP2mo ago
No description
Dennis Koch
Dennis Koch2mo ago
Those are from Filament itself. What language are you using? Is that Japanese or Korean?
Ryco
RycoOP2mo ago
Japanese
Dennis Koch
Dennis Koch2mo ago
Did you set the locale or your app to Japanese inside .env? We should have Japanese translations. Maybe not 100% covered, but we definitely have some
Ryco
RycoOP2mo ago
No description
No description
Ryco
RycoOP2mo ago
The main language will be english, but i want some transaltions.
Dennis Koch
Dennis Koch2mo ago
Ah, gotcha.
Ryco
RycoOP2mo ago
Especially in japanese.
Dennis Koch
Dennis Koch2mo ago
You are using the translation method __() for the navigation group, right?
Ryco
RycoOP2mo ago
When i choose the Romanian language its translating the buttons:
No description
Ryco
RycoOP2mo ago
No description
Ryco
RycoOP2mo ago
Is a change to be no translations for japanese?
Dennis Koch
Dennis Koch2mo ago
Hm. So the plugin seems to work. Are there any translations in Japanese?
Ryco
RycoOP2mo ago
None of them. I choose japanese everything is in english.
Dennis Koch
Dennis Koch2mo ago
Can you share the Plugin config?
Ryco
RycoOP2mo ago
Where do i find it? :))
Dennis Koch
Dennis Koch2mo ago
This part. Probably in your AppServiceProvider https://filamentphp.com/plugins/bezhansalleh-language-switch#usage
Filament
Language Switch by Bezhan Salleh - Filament
A versatile and user-friendly Locale/Language Switch designed for Filament Panels.
Ryco
RycoOP2mo ago
No description
Ryco
RycoOP2mo ago
This one?
Solution
Dennis Koch
Dennis Koch2mo ago
Yes. Japanese locale code is ja not jpn
Ryco
RycoOP2mo ago
ohhh Perfect. But i have one more question. I used jpn, is it normally show the language here even i misspeled?
Ryco
RycoOP2mo ago
No description
Dennis Koch
Dennis Koch2mo ago
The plugin probably doesn't check for existing Filament translations. Also: You could use any locale you want, if you add them yourself. But Filament uses ja.
Ryco
RycoOP2mo ago
Yep, its working great now, thank you so much.
Dennis Koch
Dennis Koch2mo ago
You're welcome

Did you find this page helpful?