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

realtebo's avatar

Italian localization of resources/lang

Do you know if there are italian localizations of resources/lang/en folder?

I have locale 'it' in config/app.php but validation errors are still in english

0 likes
20 replies
realtebo's avatar

@Sinnbeck I installed laravel-lang using composer

I set in config/app.php the 'locale' to 'it' ... I run an opt:clear

but nothing changes. validation errors are still in english.

What should I do now?

realtebo's avatar

@Sinnbeck

Well, ok, it works, I supposed that package will offer a console command to install a specific language or simply 'expose' it via auto discovery or whatelse .

realtebo's avatar

@Sinnbeck

I already find this, but, ... it exposes a lang:add command that simply add empty files ...

realtebo's avatar

@Sinnbeck nothing changes.

php artisan lang:add it
php artisan lang:update

Results in same empty italian files.

I raised an issue un lang manager package to ask for documentation

Sinnbeck's avatar

@realtebo I just tested it on a brand new project, and it worked as expected

Try it

  1. Make a new project
  2. Install composer require laravel-lang/publisher --dev
  3. Run php artisan lang:add it
  4. Check the files in resources
realtebo's avatar

@Sinnbeck

Files are published but .. empty !

For example resources/lang/it/passwords.php

<?php

return [];
Sinnbeck's avatar

@realtebo And that was on a brand new project? Not your current one.

This is mine on a brand new one

<?php

return [
    'reset'     => 'La password è stata reimpostata!',
    'sent'      => 'Ti abbiamo inviato una email con il link per il reset della password!',
    'throttled' => 'Per favore, attendi prima di riprovare.',
    'token'     => 'Questo token di reset della password non è valido.',
    'user'      => 'Non riusciamo a trovare un utente con questo indirizzo email.',
];
realtebo's avatar

@Sinnbeck

Yes. New. I am on Windows 10... could be a path issue? Any way I copied italian locales and are okay

Sinnbeck's avatar

@realtebo It might be. Maybe someone else on windows can test? I am on linux and dont have windows machine.

Sinnbeck's avatar

@realtebo How was that installed by following my exact instructions above?? They say nothing about installing the other package. Also. Wasnt the question on where to find them? As in my very first link

realtebo's avatar

@Sinnbeck

Sorry

I did it because the discussion started speaking about laravel-lang/lang package. So i first started installing this package

Then we spoke about the manager, so I installed also the manager

furqanDev's avatar

First of all you need to have the translation available for the italian language.

Secondly, you need to change the locale using app()->setLocale('it'). You should have this file in your resources/lang/it.json.

Please or to participate in this conversation.