laravel-translatable does not work with vue - laravel

I am building a project using Laravel + Vue, I used Vuei18n to localization in vue ,and laravel-translatable was used in Laravel ,but laravel-translatable does not work in a components, it shows all translations of the data, for example:
{en: "Hello" , ar:"مرحبا"}
on laravel I was using Middleware and Prefix to display the text depending on the language, but with vue + laravel this feature does not work.
is there any suggestion or solutions?

Related

How can I use laravel localization into vue components?

I'm currently working on application's translation with Laravel Localization (laravel 5.6).
I succeed my text translation on blade templates but I have some view using vuejs.
Into them I can't use directly laravel localization.
I understand that I have to send my translations files (which are in PHP) into the vue in JS.
I found some packages like :
https://github.com/rmariuzzo/Laravel-JS-Localization ; but it doesn't support laravel 5.6 (damned)...
https://github.com/martinlindhe/laravel-vue-i18n-generator ; Laravel 5 package is no longer maintain...
This application use Laravel 5.6 and vue 2.
I can't completely reorganize or upgrade Laravel or vue version.
After many research I'm still not able to do it...
Do you know how can I made translation into my vue component?
Thanks a a lot!

Few questions when it comes to building an e-commerce website in Laravel and vue

I have a few questions regarding building an e-commerce website. I want to program a small e-commerce website using Laravel and Vue. I know the basics of Laravel and Vue, but I'm struggling when it comes to selecting the best plan to program the website. So I have a few questions regarding that.
Should an e-commerce website be dynamic or SPA?
Should I use a Vue router or built-in Laravel router?
Is it good practice to mix Vue components and Blade Template or should I separate Vue and Laravel when it comes to the frontend?
Suggest you use nuxt universal, cuz need seo, spa didnt index well in search engine
For client side use Vue router, for rest api use laravel router
If you use vue + nuxt dont need blade

Laravel API and Vue SPA or inline Vue?

When working with Laravel, it seems I can use Vue inside the Laravel Blade but I can also use Laravel project only as an API while using another project (Vue in this case) as a front-end connecting to the API?
Which approach is better and has its advantages/disadvantages?

interact with different language pages in vuejs and laravel

I'm building a multi language website using Laravel and VueJS. I've build many vue components and laravel blade files in same html structure and those are different languages. I suppose to make different route file to each language.
But my problem is I cannot switch between different language. Please let me know how to do that?
If you're using blade and Vue as a library you can use https://github.com/mcamara/laravel-localization
If you're using Vue as SPA you can use https://github.com/kazupon/vue-i18n

Integrate Vue.js with laravel

I have built my static design using vue.js. Now, I need to integrate it within Laravel.
Once I do integrate Laravel with Vue then Laravel is not getting the Design files path. I mean the various Style and JS files.
FYI, I build the Vue in static design and it was working fine before integration with Laravel. But, while integrating with Laravel I am no longer using the build or build.js file. Instead of this, I am building using Laravel ways.
The main issue is the design is broken and the route is not working.

Resources