i'm trying to use a placeholder in my form with i will also want to translate base of user's language so i wrap it up in a Yii::t();
(我试图在我的表单中使用占位符,但我也想翻译用户语言的基础,所以我将其包装在Yii :: t();中。)
inside active form input attribute but the result i got is a plane string rather than a translated message below is my code: (内部活动窗体输入属性,但我得到的结果是一个平面字符串,而不是下面的翻译消息是我的代码:)
<div class="input-group custom-d-flex">
<span class="input-group-addon input-group-prepend"><i class="glyphicon glyphicon-user"></i></span>
<?= $form->field($model, 'username')->textInput([
'autofocus' => false,
'class' => 'form-control',
'required' => true,
'placeholder' => "<?= Yii::t('app', 'email');?> / <?= Yii::t('app', 'id');?> / <?= Yii::t('app', 'phone');?>"
])->label(false);
?>
</div>
and the result below
(和结果如下)
how to fix this?
(如何解决这个问题?)
thanks for any help (谢谢你的帮助)
ask by sam translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…