Closed Paulsky closed 4 years ago
It should be possible, yes—I think you'll want to put your translated strings in resources/lang/vendor/nova/en.json
. Then what you have above should work. Let me know!
Thank you @bakerkretzmar . That works! I prefer to have a dedicated translation file though. It's cleaner and easier to find and maintain. Is this possible?
Glad to hear it! Yes, you can put them in a separate file, you'll need to load that file explicitly.
Assuming your translations are in resources/lang/en.json
, in the boot()
method of your AppServiceProvider
, add something like this:
public function boot()
{
$this->loadJsonTranslationsFrom(resource_path('lang'));
}
You can see how Nova does it here.
Thank you for this great package! I would like to translate the frontend strings. Like this:
Then, in
resources/lang/vendor/nova-settings-tool/en.json
Is this possible? Thank you in advance!