Skip to content

Commit

Permalink
feature: configure custom save label per resource using localization (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob authored Mar 14, 2024
1 parent 6d1d283 commit 4cfc316
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/3.0/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ es:
other: 'archivos'
```

## Localizing buttons label

The `avo.save` configuration applies to all save buttons. If you wish to customize the localization for a specific resource, such as `Avo::Resources::Product`, you can achieve this by:

```yml
---
en:
avo:
resource_translations:
product:
save: "Save the product!"
```
## Setting the locale
Setting the locale for Avo is simple. Just use the `config.locale = :en` config attribute. Default is `nil` and will fall back to whatever you have configured in `application.rb`.
Expand Down

0 comments on commit 4cfc316

Please sign in to comment.