PHP code example of outl1ne / nova-translations-loader
1. Go to this page and download the library: Download outl1ne/nova-translations-loader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
outl1ne / nova-translations-loader example snippets
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);
// ...
}
}