Skip to main content

Livewire v4 Celebrations! Only until January 25th: Coupon LIVEWIRE4 for 40% off Yearly/Lifetime membership!

Read more here
Video

Laravel: Single to Multi-Language - Practical Demo

March 12, 2020

Enjoyed This Tutorial?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Recent Courses

Laravel Modules and DDD

16 lessons
1 h 59 min

How to Build Laravel 12 API From Scratch

28 lessons
1 h 21 min

PhpStorm Junie AI for Laravel Projects: Crash Course

7 lessons
36 min

Comments & Discussion

V
Vadim ✓ Link copied!

Povilas, thank you the exploring multi-language topic. What if i also want my URLs to be translated, something like this:

  • EN - www.site.lt/en/articles
  • LT - www.site.lt/lt/straipsniai

I come up with this solution in routes:

Route::get(__('routes.articles'), 'articleController@index')

It reads respective, translated route name from translation file:

'articles' => 'straipsniai'

But i don't know if translation file was suposed for such use. Do you know any other solution that may provide similar results?

LN
Loganathan Natarajan ✓ Link copied!

thanks, i was searching multi-lang of how to do with database

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.