title: Android - how to handle locale class
body: <p>In android My requirement is :--
  when my app will open,there will be a spinner..this spinner will call locale languages..user can set own language from there..And then total app(other activities) will show as user's select language.</p>
  
  <p>so my code is like:--</p>
  
  <pre><code>String lang[] = locale.getISO3Language();
  
          ArrayAdapter&lt;String&gt; adapter =new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item,lang);
          s1.setAdapter(adapter);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public void setLocale(String lang) {
  
          myLocale = new Locale(lang);
          Resources res = getResources();
          DisplayMetrics dm = res.getDisplayMetrics();
          Configuration conf = res.getConfiguration();
          conf.locale = myLocale;
          res.updateConfiguration(conf, dm);
  
      }
  </code></pre>
  
  <p>Am I correct??or is there another efficient way????pls suggest me...</p>