How to get private variable from I18n yii? <p>I have a problem with multi languages from yii.</p> <p>I want the admin be able to add any languages to my system.</p> <p>Therefore I need get all country and region code languages from <code>i18n</code> <code>yii</code>.</p> <p>That means I will display a dropdown list. It has all name languages. When I select any languages. it will auto generate region code.</p> <p>Ex: I selected English, It will auto generate region code is <strong>en</strong>.</p> <p>I tried <code>$languages = Yii::app()-&gt;locale-&gt;_data;</code> to get array. But because variable <code>$_data</code> is <em>private</em>.</p> <p>This is code from Clocale class :</p> <pre><code>class CLocale extends CComponent { public static $dataPath; private $_id; private $_data; </code></pre> <p>And here is code view I called: </p> <pre><code>$languages = Yii::app()-&gt;locale-&gt;_data; var_dump($languages['languages']); </code></pre> <p>If I change private <code>$_data;</code> to <code>public $_data;</code> It will return result. But this is core from yii, therefore I can't change it.</p>