From 00cceaba2099eaf5ba08621c46e76bcb116f8a1a Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Thu, 9 Jan 2020 23:41:09 +0300 Subject: [PATCH] #3 Use translations (customizable) --- src/ServiceProvider.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 1d8c353..8cb4ea8 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -14,6 +14,10 @@ public function boot(): void Nova::script('nova-unlayer-field', __DIR__.'/../dist/js/field.js'); }); + $this->publishes([ + __DIR__.'/../resources/lang/' => resource_path('lang/vendor/nova-unlayer-field'), + ]); + $this->registerTranslations(); } @@ -22,5 +26,6 @@ protected function registerTranslations(): void $currentLocale = app()->getLocale(); Nova::translations(__DIR__."/../resources/lang/$currentLocale.json"); + Nova::translations(resource_path("lang/vendor/nova-unlayer-field/$currentLocale.json")); } }