New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

workup/nova-translations-loader

This Laravel Nova package helps developers load translations into their packages (forked by optimistdigital).
1,548
Install
composer require workup/nova-translations-loader
Latest Version:5.0.1.001
PHP:>=8.0
Laravel:8 · 9 · 10
Older releases:6 · 7
License:MIT
Last Updated:Aug 28, 2023
Links: GitHub  ·  Packagist
Maintainer: workup

Nova Translations Loader

Latest Version on Packagist Total Downloads

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 workup/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,295,677 39
optimistdigital/nova-translations-loader

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

3,839,009 39
dive-be/nova-translation-editor

A Laravel Nova tool for editing your translation strings.

3,659 0
epartment/nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values

4,703,233 378
eminiarts/nova-tabs

Laravel Nova - Tabs.

4,610,439 464

Version History

Version Released PHP Laravel License
5.0.1.001 >=8.0 ^8.0|^9.0|^10.0 MIT
3.1.4.001 ^8.0 ^7.21 || ^8.0 || ^9.0 MIT
3.1.3.001 ^8.0 ^7.21 || ^8.0 || ^9.0 MIT
3.1.2.001 ^8.0 ^8.0 MIT
3.1.2 >=7.2.0 ^7.21 || ^8.0 MIT