From 6f308e055bf3f54952dcfc88a6651c1a783f1b5d Mon Sep 17 00:00:00 2001 From: dozer111 Date: Mon, 3 Sep 2018 10:06:50 +0300 Subject: [PATCH] добавил переводы для Datepicker 2) подкоректировал значение ХК --- common/helpers/datePickerData.php | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/messages/ru/app.php | 1 + frontend/views/site/signup.php | 42 +++++++++++++++++++++++------------------- 3 files changed, 132 insertions(+), 19 deletions(-) create mode 100644 common/helpers/datePickerData.php diff --git a/common/helpers/datePickerData.php b/common/helpers/datePickerData.php new file mode 100644 index 0000000..bbbc169 --- /dev/null +++ b/common/helpers/datePickerData.php @@ -0,0 +1,108 @@ +initJsDatePicker(); + $currentLanguage=Language::getCurrent()->url; + return $this->result[$currentLanguage]; + } + + + private function initJsDatePicker(){ + $this->result['ru']=<<result['en']=<<result['ua']=<<result['fr']=<< 'РЕГИСТРАЦИЯ', + 'Signup' => 'Регистрация', '12-18' => '12-18 ноября 2018 года Киев, Украина', 'About' => 'Про Форум', 'Orgs' => 'Организаторы', diff --git a/frontend/views/site/signup.php b/frontend/views/site/signup.php index 8481686..d0ea9ab 100755 --- a/frontend/views/site/signup.php +++ b/frontend/views/site/signup.php @@ -9,27 +9,31 @@ use yii\web\View; use yii\widgets\ActiveForm; use common\models\Customer; +use common\helpers\datePickerData; -$this->title = 'Signup'; +$this->title = \Yii::t('app','Signup'); $this->params['breadcrumbs'][] = $this->title; -$js = <<getDatepickerJs(); +//$js = <<registerJs($js, View::POS_LOAD) ?> -- libgit2 0.21.4