In the previous tutorial, you have learned how to change your application locale and provide translated content. In this tutorial you will learn how to enable users to change the language of the website.
There are actually two ways of doing this:
Creating a language switcher is very simple and you could probably write it yourself. The whole process would go like this. Have a config file with languages supported, look for the locale in the URL, call
\App::setLocale('hr'); depending on the locale found in the URL. There ain't much to it.
With some failures along the way, you could probably pull it off. I have tried doing so in Laravel 4.2 and have burned myself in the end. Since then I have switched to using a package mcamara/laravel-localization.
In this tutorial, we will use the above-mentioned package to provide a language switcher, have routes that can be translated and routes that do not need to be translated.
Laravel makes implementing authentication very simple. We will implement authentication in our existing application.
In this tutorial, we will cover creating, updating, deleting and viewing all multilingual articles.
Let's start with the basics. Learn how to change your application locale, write localization files and use translations in your Laravel application.
With API Blueprint you can quickly design and prototype APIs to be created or document and test already deployed mission-critical APIs.