optimistdigital/nova-translations-loader
Nova Translations Loader
This Laravel Nova package helps developers load translations into their packages.
Requirements
php: >=8.0laravel/framework: ^9.0|^10.0laravel/nova: ^4.0
Installation
Install the package in a Laravel Nova project via Composer:
composer require outl1ne/nova-translations-loader
Usage
Inside a Laravel's ServiceProvider, use the LoadsNovaTranslations trait and call $this->loadTranslations():
use Outl1ne\NovaTranslationsLoader\LoadsNovaTranslations;
class SomePackagesServiceProvider extends ServiceProvider
{
use LoadsNovaTranslations;
public function boot()
{
// ...
/**
* Loads translations into the Nova system.
*
* @param string $packageTranslationsDir The directory for the packages' translation files.
* @param string $packageName The name of the current package (ie 'nova-menu-builder').
* @param boolean $publishTranslations Whether to also automatically make translations publishable.
* @return null
**/
$this->loadTranslations(__DIR__ . '/../resources/lang', 'nova-package', true);
// ...
}
}
Credits
License
Nova Translations Loader is open-sourced software licensed under the MIT license.
Related Packages
outl1ne/nova-translations-loader
This Laravel Nova package helps developers load translations into their packages...
7,090,492
39
outl1ne/nova-sortable
This Laravel Nova package allows you to reorder models in a Nova resource's inde...
2,482,312
285
optimistdigital/nova-sortable
This Laravel Nova package allows you to reorder models in a Nova resource's inde...
2,213,089
285
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 5.0.3 | >=8.0 | MIT | ||
| 5.0.2 | >=8.0 | MIT | ||
| 5.0.1 | >=8.0 | ^8.0| | MIT | |
| 5.0.0 | >=8.0 | ^8.0| | MIT | |
| 4.0.1 | >=8.0 | ^9.0 | MIT | |
| 4.0.0 | >=8.0 | ^9.0 | MIT | |
| 3.1.4 | >=7.2.0 | ^7.21 | | MIT | |
| 3.1.3 | >=7.2.0 | ^7.21 | | MIT | |
| 3.1.2 | >=7.2.0 | ^7.21 | | MIT | |
| 3.1.0 | >=7.2.0 | ^7.0 | | MIT | |
| 3.0.0 | >=7.2.0 | ^7.0 | | MIT | |
| 2.0.5 | >=7.1.0 | ^6.0 | | MIT | |
| 2.0.4 | >=7.1.0 | ^6.0 | | MIT | |
| 2.0.3 | >=7.1.0 | ^6.0 | | MIT | |
| 2.0.2 | >=7.1.0 | ^6.0 | | MIT | |
| 2.0.1 | >=7.1.0 | ^6.0 | | MIT | |
| 2.0.0 | >=7.1.0 | ^6.0 | | MIT | |
| 1.0.5 | >=7.1.0 | ^6.0 | | MIT | |
| 1.0.4 | >=7.1.0 | ^6.0 | | MIT | |
| 1.0.3 | >=7.1.0 | ^6.0 | | MIT | |
| 1.0.2 | >=7.1.0 | ^6.0 | | MIT | |
| 1.0.1 | >=7.1.0 | ^6.0 | | MIT | |
| 1.0.0 | >=7.1.0 | ^6.0 | | MIT |