Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/3.x/package-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,17 @@ return redirect('/')->with(['notification' => [
]]);
```

By default, there are 4 types: `info`, `success`, `warning`, and `error`. The style differences are defined in the [frontend config](https://github.com/rapidez/core/blob/master/config/rapidez/frontend.php), everything else is in the [Blade template](https://github.com/rapidez/core/blob/master/resources/views/components/notifications.blade.php).
By default, there are 4 types: `info`, `success`, `warning`, and `error`. The style differences are defined in the [frontend config](https://github.com/rapidez/core/blob/master/config/rapidez/frontend.php), everything else is in the [Blade template](https://github.com/rapidez/core/blob/master/resources/views/components/notifications.blade.php).

## Frontend translations
Rapidez adds some [frontend translations](theming.md#translations) by default. Your package might need to have some translations within Javascript. If you register a frontend.php translations file within a rapidez namespace, it wil automaticly be included in the frontend translations.

```php
$this->loadTranslationsFrom(__DIR__ . '/../lang', 'rapidez-statamic');
```

You can use them by referencing it by package name. For example within the [Rapidez Statamic](https://github.com/rapidez/statamic) package:

```js
window.config.translations.packages.statamic
```