outl1ne / nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.
MIT License
274 stars 96 forks source link

How to translate sidebar lable? #33

Closed PoojaJadav closed 3 years ago

PoojaJadav commented 3 years ago

I want to translate this sidebar lable Settings. How can I translate? image

Tarpsvo commented 3 years ago

Check README, localization section.

PoojaJadav commented 3 years ago

Check README, localization section.

I tried. but it's not working. Only sidebar label and submit button lable not translate :(

Tarpsvo commented 3 years ago

Is your app()->getLocale() correct?

PoojaJadav commented 3 years ago

Is your app()->getLocale() correct?

Yes... Other all labels translated except this. My code is like this in .../resources/lang/vendor/nova-settings/de.json files:

"novaSettings.navigationItemTitle": "Einstellungen", "novaSettings.saveButtonText": "Einstellungen speichern",

Check the below screen short. image

Tarpsvo commented 3 years ago

Hmm.... It's possible the locale is set too late. Is it possible for you to call app()->setLocale() any earlier?

PoojaJadav commented 3 years ago

Hmm.... It's possible the locale is set too late. Is it possible for you to call app()->setLocale() any earlier?

I have already set the locale on Http/kernel. :)

PoojaJadav commented 3 years ago

I got translation on fields, if I move "Registering fields" boot() to tools(). But still, button and label are not translated.

image

PoojaJadav commented 3 years ago

I got translations after update the package version :)