F
F
Fireproof Cockroach2016-11-11 21:42:31
Laravel
Fireproof Cockroach, 2016-11-11 21:42:31

How to enable multilanguage in Laravel 5.3 normally and without plugins (sorry)?

This is some kind of nonsense. Out of the box, it is impossible to screw the languages ​​\u200b\u200bso that they:

  • Opened by urls domain.com/en/home and /domain.com/ru/home
  • Worked without additional packages from composer
  • We worked not with one route (Route::get()), but with a group (Route::group())
  • After agreeing to put something was fresh (5.2+)

Tell me how to do it?
Basic requirements:
  • Routes by /domain.com/en|ru
  • Possible with middleware
  • Working with Route::resource() (does not work with REST)
  • Working with url() helper (twig bolted)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-11-11
Hrebet @hrebet

What is the problem with mcamara/laravel-localization ?
Except for the second paragraph of the requirements. ;-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question