title: Yii2 how to get the length of translated message
body: <p>In my project I am trying to provide dynamic sizing in one of my modules. I am trying to figure out in yii2 internationalization how can I get the string length of the translated text.</p>
  
  <p>for instance: </p>
  
  <pre><code> &lt;?php 
         //I am getting the name from the database. Assume name to be "Hello"
         $name = $gettingNameFrom-&gt;db;
  
         //Now $name is equal to string "Hello"
  
         //The below function will dump the output to be int(5) as the length of hello is 5
         var_dump(strlen($name));
  
         //Now I want to apply translation to the above name in the db.
         // I have all my translation configured and working fine.
  
         echo Yii::t('app','{0}',[$name]);
         //I have configured fo french language.
         // the above output for "Hello" in french would be "Bonjour".
  
  
  
      ?&gt;
  </code></pre>
  
  <p>Now how can I get the length of the translated text? I am unable to find any help online on this topic. Any help appreciated. </p>
  
  <p>Thanks!!</p>