conedevelopment / i18n

Push your Laravel translations to the front-end and use them easily with JavaScript.
https://pineco.de/using-laravels-localization-js/
MIT License
129 stars 21 forks source link

Select specific files #6

Closed sardoj closed 5 years ago

sardoj commented 5 years ago

Is it possible to add an option to select which files we want to use for translations? For the moment i think translations of all files are added. It could be huge in a big project, and Google doesn't like very much when a page take time to load. Any solution? Thanks for your help.

iamgergo commented 5 years ago

When the view will be compiled, the JSON format will be cached in the compiled view. So it's completely static. Because of this, I don't think to filter certain translations on the back-end would be a good solution.