title: how to use multilanguage in yii2?
body: <p>How to create multilanguage app in yii2?<br />
  Is there any preinstall message in yii2?</p>
  
  <p><em>config:</em> </p>
  
  <pre><code>'language' =&gt; 'es',
  'components' =&gt; [
      'i18n' =&gt; [
          'translations' =&gt; [
              'app*' =&gt; [
                  'class' =&gt; 'yii\i18n\PhpMessageSource',
                  //'basePath' =&gt; '@app/messages',
                  'sourceLanguage' =&gt; 'ru-RU',
  
                  'fileMap' =&gt; [
                      'app' =&gt; 'app.php',
                      'app/error' =&gt; 'error.php',
                  ],
              ],
          ],
      ],
  </code></pre>
  
  <p>view : </p>
  
  <pre><code>echo \Yii::t('app', 'I am a message!');
  $username = 'Alexander';
  echo \Yii::t('app', 'Hello, {username}!', [
      'username' =&gt; $username,
  ]);
  </code></pre>