Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspar committed Sep 10, 2020
1 parent b7876b4 commit 226a736
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,40 @@ public function tools()
}
```

## Defining locales
The config accepts a dictionary of locales.

```php
// in /config/nova-blog.php

// ...
'locales' => [
'en' => 'English',
'et' => 'Estonian',
],

// OR

'locales' => function () {
return Locale::all()->pluck('name', 'key');
},

// if you wish to cache the configuration, pass a reference instead:

'locales' => NovaBlogConfiguration::class . '::locales',

// ...
```

### Nova Lang
This package supports [optimistdigital/nova-lang](https://github.com/optimistdigital/nova-lang) for easier content localization.
After installing and setting up `nova-lang` package, you can use `nova_lang_get_all_locales` helper function in `nova-blog` config file

```php
'locales' => nova_lang_get_all_locales(),
```


### Toggling page draft feature

Draft feature allows you to create previews of resources before publishing them. By default this feature is disabled but can be enabled by installing [nova-drafts](https://github.com/optimistdigital/nova-drafts) package.
Expand Down

0 comments on commit 226a736

Please sign in to comment.