Joanna
Joanna

Reputation: 41

Laravel Nova: Is there a way to change text of "Cancel" button?

I am trying to change the text of the "Cancel" button to "Back" since it fits the button's behavior better. Is there a way to do this? I tried finding the element in the DOM and changing its textContent but it didn't work as expected. (This is the button that appears when creating a new Resource).

Upvotes: 1

Views: 1085

Answers (1)

Saumini Navaratnam
Saumini Navaratnam

Reputation: 8850

Localization

You can customise the en.json file under resources/lang/vendor/nova translation directory.

Edit "Cancel": "Cancel" to "Cancel": "Back".

Note: This will update all the places where the Cancel has been used.

Upvotes: 1

Related Questions