spatie / laravel-translatable

Making Eloquent models translatable

Home Page:https://spatie.be/docs/laravel-translatable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Best way to fetch one language through an API?

vincentcordel opened this issue · comments

It says it all.

Once the models are setup, what would be the best way to fetch the API for the specified language?
Using a lang params in the query? (ie api/posts?lang=en)
Using a route for each language (ie api/en/posts, api/fr/posts)

Or something else that's even better :)