Android has attributes related to multi-language support. Use the following Code Print system-related property values. For specific attributes, see the document. Package COM. example; import android. app. activity; import android. content. res. configuration; import android. OS. bundle; import android. widget. textview; import Org. w3C. dom. text; import Java. util. locale; public class myactivity extends activity {
@ Overridepublic void oncreate (bundle savedinstancestate ){
Super. oncreate (savedinstancestate );
Setcontentview (R. layout. Main );
Locale locale = This. getresources (). getconfiguration (). locale;
Stringbuffer sb = new stringbuffer ();
SB. append ("locale. tostring ():" + locale. tostring ());
SB. append ("\ nlocale. getcountry ():" + locale. getcountry ());
SB. append ("\ nlocale. getdisplaycountry ():" + locale. getdisplaycountry ());
SB. append ("\ nlocale. getdisplaylanguage ():" + locale. getdisplaylanguage ());
SB. append ("\ nlocale. getdisplayname ():" + locale. getdisplayname ());
SB. append ("\ nlocale. getdisplayvariant ():" + locale. getdisplayvariant ());
SB. append ("\ nlocale. getiso3country ():" + locale. getiso3country ());
SB. append ("\ nlocale. getiso3language ():" + locale. getiso3language ());
SB. append ("\ nlocale. getlanguage ():" + locale. getlanguage ());
SB. append ("\ nlocale. getvariant ():" + locale. getvariant ());
Textview = (textview) This. findviewbyid (R. Id. Text );
Textview. settext (sb. tostring ());
This. settitle ("local object ");
}
}