R
R
Roman Volkov2016-02-12 17:46:02
HTTP Cookies
Roman Volkov, 2016-02-12 17:46:02

How to set locale value for application by getting it from cookie?

There is a multilingual application, it is necessary that when you click on the switch, the language is remembered in the cookie, and when you navigate through the pages, this value is pulled up or the standard value is set?
Laravel 5.2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Pochepko, 2016-02-12
@white_wolf_17

Setting the locale of the application like this
And changing the language - you need to write a route that will write the language into the session and redirect back
session()->put('lang', 'he');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question