php - How to get private variable from I18n yii? -


I have problems with multi languages ​​from yii.

I want the administrator to have any language in my system

Therefore, I want all the country and region code languages ​​to be i18n yii Need to get from

This means that I will display a dropdown list. There are languages ​​of all names in it when I select any language, it will generate automatic area code.

Ex: I have selected English, it will generate automatic area code en .

I tried $ languages ​​= Yii :: app () - & gt; Locale-> _data; to get an array but because the variable $ _ data is private .

This is a code from classicalclass:

  class increases the CLocale CComponent {public static $ data path; Private $ _id; Private $ _data;   

And here is the code view that I said:

  $ languages ​​= Yii :: app () - & gt; Locale-> _data; Var_dump ($ languages ​​['language']);   

If I have private $ _ data; Change the public $ _Data from ; This will remove the result but it is originally from yii, so I can not change it.

folder parsing folder names from the directory names <$ P>

  if ( $ handle = Opendir ( '/ path / to / files')) {While (false! == ($ entry = Reddir ($ handle))) {echo "$ entry \ n"; } Close ($ handle); }   

It is better to increase the classroom and copy the entire contents (_data are private, so you can not access it).

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -