vanilophp / framework

The truly Laravel E-commerce Framework
https://vanilo.io
MIT License
810 stars 102 forks source link

Multilanguage support #59

Closed taiwanleaftea closed 4 years ago

taiwanleaftea commented 4 years ago

We are going to build our new shop on Laravel, and looking for e-commerce framework. So I would like to know, how are you going to make multilanguage support? Will you use something like spatie/laravel-translatable (which stores translatable attributes as JSON), or translatable items will be stored in additional tables.

fulopattila122 commented 4 years ago

If multilanguage support will be in the core, then it's 90% probability that it'll be built with the mentioned spatie package.

I'll give you an update over the weekend.

taiwanleaftea commented 4 years ago

Thank you for your answer. It's not very nice for our project, because we have multilingual slugs and, as I understand, spatie's module doesn't adds generated virtual fields for json properties, and don't build index for them.

fulopattila122 commented 4 years ago

Which solution would you prefer?

taiwanleaftea commented 4 years ago

I would prefer to have language info in additional tables, like i.e. Sylius, or this package https://github.com/Astrotomic/laravel-translatable do.

fulopattila122 commented 4 years ago

I think you can add this package to your application and apply them to your models (incl. the ones from Vanilo). Even after we'll add multi language support it'll be optional so that it won't collide with your existing solution.

https://vanilo.io/how-to/use-custom-models-in-your-application

So I would say go ahead with that package. Do you think it's feasible for you? Feel free to ask further questions on the run.

taiwanleaftea commented 4 years ago

Yes, it'll be working solution.

fulopattila122 commented 4 years ago

I'd be happy to hear about your experience implementing the solution.