Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Husniddin's avatar

Filament default language issue

Laravel 11 Filament 3

Trying to change default language

changed config/app.php local to ru

But whole system showing only english

Tried clearing cache but still noting changed

0 likes
2 replies
LaryAI's avatar
Level 58

To change the default language in a Laravel application using Filament, you need to ensure a few things are correctly set up. Here are the steps to troubleshoot and resolve the issue:

  1. Set the Locale in config/app.php: Make sure you have set the locale to ru in your config/app.php file.

    'locale' => 'ru',
    
  2. Check Language Files: Ensure that you have the necessary language files for Russian in the resources/lang/ru directory. If these files are missing, you need to create them or download them from a reliable source.

  3. Clear Cache: After making changes to the configuration, clear the cache to ensure the changes take effect. Run the following commands:

    php artisan config:cache
    php artisan cache:clear
    php artisan view:clear
    
  4. Set Locale in Filament Configuration: Filament may have its own configuration for localization. Check the config/filament.php file and ensure the locale is set correctly.

    'locale' => 'ru',
    
  5. Middleware for Localization: Ensure that the \Illuminate\Session\Middleware\StartSession and \Illuminate\View\Middleware\ShareErrorsFromSession middleware are included in your web middleware group in app/Http/Kernel.php.

  6. Verify Filament Translations: Filament should have its own translation files. Ensure that the translations for Filament are available in the resources/lang/vendor/filament/ru directory.

Here is a summary of the steps in code:

  1. Update config/app.php:

    'locale' => 'ru',
    
  2. Clear Cache:

    php artisan config:cache
    php artisan cache:clear
    php artisan view:clear
    
  3. Update config/filament.php:

    'locale' => 'ru',
    

By following these steps, you should be able to change the default language of your Laravel application using Filament to Russian. If the issue persists, double-check that all necessary translation files are in place and correctly named.

Please or to participate in this conversation.