how can i change these texts to spanish?
All my environment is in english (database and code) but I am in a country where people’s native language is spanish, so I need to change some text likes these that are marked, that are basically created by make:filament-resource
Solution:Jump to solution
For the model name you can do something like this:
```php
public static function getModelLabel(): string
{
return __('Product Category');...
4 Replies
First look into how translations work in laravel. Then you need to override the appropriate methods on the filament resources / pages to return your translations.
Solution
For the model name you can do something like this:
and insert the two strings inside the
lang/es.json
fileFor the rest of the missing translation I suggest taking them from this repository: https://github.com/Laravel-Lang/lang
GitHub
GitHub - Laravel-Lang/lang: List of 78 languages for Laravel Framew...
List of 78 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI. - GitHub - Laravel-Lang/lang: List of 78...
Thank you!! I was at documentation and I was using $label protected static, but that way that you suggested me is better because I can specify when use plural or singular label.