Open cedric-anne opened 3 years ago
Translation from JSON files are not exposed in window.translations. I was able to expose them using this following piece of code in I18nServiceProvider::translations().
window.translations
I18nServiceProvider::translations()
$translations = $translations->merge( collect(File::files(resource_path('lang')))->filter(function ($file) { return $file->getExtension() === 'json'; })->mapWithKeys(function ($file) { return [ basename($file->getFilenameWithoutExtension()) => collect(json_decode($file->getContents(), true)), ]; }) );
When exposing translations, thoose having a key containing a . are not working.
.
Translation from JSON files are not exposed in
window.translations
. I was able to expose them using this following piece of code inI18nServiceProvider::translations()
.When exposing translations, thoose having a key containing a
.
are not working.