V
V
Vitaly Liber2015-04-14 08:36:59
Yii
Vitaly Liber, 2015-04-14 08:36:59

How to change field name in Yii2 Active Form?

There is an Active Form and Yii2. Initially, the fields in it are in English. It is necessary to make them in Russian.
e10d1996a94d42a4ac56645b76f6d0bd.PNG
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander N++, 2015-04-14
@VitalyLiber

It is better to have a dictionary if the site will have 2+ languages

public function attributeLabels()
    {
        return [
            'name' => 'Имя',
            'email' => Yii::t('app','email'),
           //
        ];
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question