title: Language not changed in android
body: <p>I have tried to change the language of to all my activity.But it does not change.I have tried initially for changing the language in single activity. what to do for changing the language at all activity.`  </p>
  
  <pre><code> @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          this.setContentView(R.layout.language);
  
          Spinner spinner = (Spinner) findViewById(R.id.spinner1);
          Button button=(Button)findViewById(R.id.button1) ;
  
  
  
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent i= new Intent(LocalizationUpdaterActivity.this,HomePage.class);
                  startActivity(i);
              }
          });
          spinner.setPrompt("select language");
          ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item,languages);
  
  /*        ArrayAdapter&lt;string&gt; adapter = new ArrayAdapter&lt;string&gt;(this,
                  android.R.layout.simple_spinner_item, languages);*/
          adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          spinner.setAdapter(adapter);
  
          spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
  
              public void onItemSelected(AdapterView arg0, View arg1,
                                         int arg2, long arg3) {
                  Configuration config = new Configuration();
                  switch (arg2) {
  
                      case 0:
                         Locale myLocale = new Locale("fa");
                          Resources res = getResources();
                          DisplayMetrics dm = res.getDisplayMetrics();
                          Configuration conf = res.getConfiguration();
                          conf.locale = myLocale;
                          res.updateConfiguration(conf, dm);
                          getBaseContext().getResources().updateConfiguration(
                                  getBaseContext().getResources().getConfiguration(),
                                  getBaseContext().getResources().getDisplayMetrics());
                          setContentView(R.layout.language);
                          Intent refresh = new Intent(LocalizationUpdaterActivity.this, LocalizationUpdaterActivity.class);
                          startActivity(refresh);
                          break;
                      default:
                          config.locale = Locale.TAIWAN;
                          break;
                  }
                  getResources().updateConfiguration(config, null);
              }
  
              public void onNothingSelected(AdapterView arg0) {
                  // TODO Auto-generated method stub
  
              }
          });
  
      }
  
  
      private String[] languages = { "Inglese", "Italiano", "Francese" };
  </code></pre>
  
  <p>`</p>