Support the ongoing development of Laravel.io →
posted 10 years ago
Requests
Last updated 2 years ago.
0

You don't need separate routes for multilingual sites. Suppose they change the language in a dropdown, just use some Javascript and redirect to location.pathname + '?lang=' + lang

Then perhaps at the top of the routes or in a service provider:

if (Input::get('lang') {
    App::setLocale(Input::get('lang'));
});

Then use the Language files so you show the correct text.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

luknei luknei Joined 7 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.