Polyscope - The agent-first dev environment for Laravel

Nova Translations Loader

Nova Translations Loader stats

Downloads
3M
Stars
37
Open Issues
1
Forks
33

View on GitHub →

This Laravel Nova package helps developers load translations into their packages.

Nova Translations Loader

This Laravel Nova package helps developers load translations into their packages.

Requirements

  • php: >=8.0
  • laravel/framework: ^9.0|^10.0
  • laravel/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.

outl1ne photo

Previously we were Optimist Digital. Now we're @outl1ne. If you wish to use our packages, please consider switching to the outl1ne namespace.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Optimistdigital Nova Translations Loader Related Articles

2019 in Review image

2019 in Review

Read article
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
CodeKudu logo

CodeKudu

Stand-ups, Retrospectives, and 360° Feedback for the entire team. 50% off with code LARAVELNEWS.

CodeKudu
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech