laravel-nova-nested-form icon indicating copy to clipboard operation
laravel-nova-nested-form copied to clipboard

What's the best way to translate things in LNNF

Open SirMishaa opened this issue 3 years ago • 2 comments

Hello !

I would like to change the language of Laravel Nova nested form, to use my own translation.

Like changing "No related x yet" or things like that.

What's the best way to do it?

Regards

SirMishaa avatar May 10 '21 03:05 SirMishaa

Any solution yet?

NoahNxT avatar Dec 14 '21 19:12 NoahNxT

From https://nova.laravel.com/docs/3.0/customization/localization.html#frontend

You can add the translation in your NovaServiceProvider boot() function :

Nova::serving(function () {
        Nova::translations([
            "No related :pluralLabel yet." => "Pas encore ajouté de :pluralLabel",
            "Update Related :resource" => "Mettre à jour :resource"
        ]);
});

tomheno avatar Feb 07 '22 01:02 tomheno