I
I
IvanMogilev2020-09-03 09:22:38
Yii
IvanMogilev, 2020-09-03 09:22:38

How to determine the current language in renderAjax?

Good afternoon, I have a form called by Ajax in the FormController controller. Is it possible to get the current language of the site in it? Yii::$app->language outputs ru because the code is called in form/signup and the current page is site.ru/kz/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-09-03
@IvanMogilev

Good afternoon.
You can get it from cookies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question