Closed pmochine closed 3 years ago
When using with inertia you should load translations using the blade directive @translations.
In production, the matice_translations.js
file is auto-generated by the @translations directive (if the file does not already exist). Matice handles it for you, you don't have to call matice:generate
yourself.
@GENL thanks btw for the answer!
Currently, I'm developing my first Inertia project. Everything that should work works correctly. But I'm still not sure if I'm missing something.
For example do I need:
php artisan matice:generate
for Inertia?Currently, I'm just using
@translations
in myapp.blade.php
. When I'm switching the languages, I'm using the normal<a>
tag, not the Inertia links.But I noticed that
@translations
is creating all languages:In #10 you are saying: "In production, matice lazy loads the translations.".
I just tried to set
APP_ENV=production
but it's still the same. Maybe you mean the generated js file fromphp artisan matice:generate
?Thank you! And p.s. this is a really great package! Really well done!