简体   繁体   中英

How to change button text in Laravel Nova?

在此处输入图片说明 [![enter image description here][2]][2]

There is another screen shot, in which need to change no file selected text.

You can use Nova's built-in Laravel localization feature to change the name for relationship-oriented buttons. It is explained in the docs here: https://nova.laravel.com/docs/2.0/customization/localization.html#relationships

I discovered the solution to above question today.

that is very simple.

Just add the translated text in auto-generated translation files from nova.

  • When we install the nova, it will generate resources/lang/vendor/nova translation directory.
  • You can create your required lang file, like in my case, I need to add dutch translation so, I created the nl.json file.
  • Simply override the text as shown below.

{ "no file selected": "geen bestand geselecteerd" }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM