title: Yii2 Internationalization translation not working for model validation
body: <p>I have i18n set up and it's working perfectly for everything except for core validators and model attribute labels. Any ideas how to fix?</p>
  <p>In <code>common\models\Student.php</code>, I setup validation rules so that the password input takes a minimum length of 5 characters, and that the phone is required:</p>
  <pre><code>['password', 'string', 'length' =&gt; [5]],
  ['phone', 'required'],
  </code></pre>
  <p>I also set up the attribute labels:</p>
  <pre><code>public function attributeLabels() {
      return [
          'password' =&gt; Yii::t('app', 'Password'),
          'phone' =&gt; Yii::t('app', 'Phone Number'),
      ];
  }
  </code></pre>
  <p>I have also set up their respective translations in messages file (which is working for everything except for validation)</p>
  <p>Now when I validate the model in English, I get the following:</p>
  <blockquote>
  <p>Password should contain at least 5 characters.</p>
  <p>Phone Number cannot be blank.</p>
  </blockquote>
  <p>Which shows English working perfectly. However when I try Arabic, I get the following:</p>
  <blockquote>
  <p>{attribute} يجب أن يحتوي على أكثر من {min, number} {min, plural, one{حرف} few{حروف} many{حرف}}.</p>
  <p>Phone Number لا يمكن تركه فارغًا.</p>
  </blockquote>
  <p>Arabic translation is being loaded from Yii2 framework files:
  <a href="https://github.com/yiisoft/yii2-framework/blob/master/messages/ar/yii.php" rel="nofollow noreferrer">https://github.com/yiisoft/yii2-framework/blob/master/messages/ar/yii.php</a></p>