Skip to content

Commit

Permalink
#3 Use translations (customizable)
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Jan 9, 2020
1 parent e95f27c commit 00cceab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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"));
}
}

0 comments on commit 00cceab

Please sign in to comment.