<?php
    
    namespace common\modules\language\widgets;
    
    use common\modules\language\models\Language;
    use yii\bootstrap\Widget;

    class LanguagePicker extends Widget
    {
        public function init()
        {
            
        }
        
        public function run()
        {
            return $this->render('view', [
                'current' => Language::getCurrent(),
                'languages' => Language::find()->where(['!=', 'language_id', Language::getCurrent()->language_id])->all(),
            ]);
        }
    }