A
A
alex_belouss2017-02-09 06:32:35
Yii
alex_belouss, 2017-02-09 06:32:35

How to change data language in Yii2 Select2 widget?

https://github.com/kartik-v/yii2-widget-select2
In the drop-down menu there is a list of countries in English, when you change the language, the list should change, for example, to Russian.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2017-02-09
@qonand

The list of countries is content. And the server part should be engaged in the translation of content (no matter what widget you use). Use standard internationalization tools for this.

M
Maxim Timofeev, 2017-02-09
@webinar

When you change the language, the page usually reloads and the url changes. This means that the page is re-formed in php, so you just need to submit data to the widget depending on the current language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question