Replies: 1 comment
-
Hi Raymond, I'm curious to know what your approach is. I have this doubt too. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
Stack: Laravel / Inertia (VueJS)
Installed this translatable package next to packages like Laravel-Data (from Spatie too).
What is the best practice here to show the right locale translation in VueJS?
My ProductData object is:
App\Data\ProductData {#1960 ▼ // app/Http/Controllers/ProductController.php:30 #_partialTrees: null #_includes: [] #_excludes: [] #_only: [] #_except: [] #_additional: [] #_wrap: null +id: 1 +product_category_id: 1 +name: array:2 [▼ "en" => "hello" "nl" => "test 123" ]
Are you transforming the data in backend already (Spatie Laravel-Data package for example) to get the right locale under "name" or do you write a Vue function to retrieve the right locale and will you always send a json the frontend?
Enjoy your day,
Raymond
Beta Was this translation helpful? Give feedback.
All reactions