I was wondering what would be the best way to display my Spark plan features in multiple different languages.
Let's say I have the followings features
Spark::plan('Premium', 'monthly-artist-premium')
->price(10)
->trialDays(14)
->features([
'Online profile', 'Access To More Features',
]);
I thought about doing something like this using Laravel's translation tool and the translation keys
Spark::plan('Premium', 'monthly-premium')
->price(10)
->trialDays(14)
->features([
'base.Online_profile', 'base.Access_to_more_features',
]);
And then when rendering the plans using Vue I would do something like this, but it's not translating.
<li class='pricing-feature' v-for="feature in plan.features">
@lang('@{{ feature }}')
</li>
Any idea how I could implement this to handle multiple languages?
Not the best solution, but here's what I ended up doing:
Then when showing the plans in
register-common.blade.php
I did something like this with the v-if conditions for each different plans