Nova Translations Loader
Nova Translations Loader stats
- Downloads
- 917.9K
- Stars
- 37
- Open Issues
- 1
- Forks
- 33
This Laravel Nova package helps developers load translations into their packages.
Nova Translations Loader
The Nova Translations Loader is a Laravel Nova package designed to facilitate the loading of translations into Laravel Nova applications. This package is especially useful for developers building multilingual Nova packages, ensuring seamless integration of language files.
Key Features:
- Ease of Translation Loading: Simplifies the process of incorporating translations into Nova packages.
- Automatic Publishing Option: Allows translations to be automatically made publishable, easing the deployment process.
Requirements:
- PHP version 8.0 or higher.
- Laravel Framework version 9.0 or 10.0.
- Laravel Nova version 4.0 or higher.
Installation:
The package can be installed via Composer:
composer require outl1ne/nova-translations-loader
Usage:
To use the package, include the LoadsNovaTranslations trait within a Laravel ServiceProvider and configure the loadTranslations method as shown below:
use Outl1ne\NovaTranslationsLoader\LoadsNovaTranslations; class SomePackagesServiceProvider extends ServiceProvider{ use LoadsNovaTranslations; public function boot() { $this->loadTranslations(__DIR__ . '/../resources/lang', 'nova-package', true); }}
This setup allows for loading translations from a specified directory, associating them with a package name, and optionally setting them to be publishable.
Credits:
This package streamlines the translation management process in Laravel Nova applications, making it an essential tool for developers working with multilingual environments.