title: Language set to default after app close in android
body: <p>i am making an multilingual application . i gave two options for language change . Language change is working but after user close app . it change back to default language .     </p>
  
  <pre><code>  public boolean onOptionsItemSelected(MenuItem item) {
  
      switch (item.getItemId()) {
          case R.id.hn:
              String languageToLoad = "hi";
              Locale locale = new Locale(languageToLoad);
              Locale.setDefault(locale);
              Configuration config = new Configuration();
              config.locale = locale;
              getBaseContext().getResources().updateConfiguration(config,
                      getBaseContext().getResources().getDisplayMetrics());
              this.setContentView(R.layout.activity_main);
              Intent i = getBaseContext().getPackageManager()
                      .getLaunchIntentForPackage(getBaseContext().getPackageName());
              i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
              startActivity(i);
              break;
          case R.id.eng:
              languageToLoad = "en"; // your language
              locale = new Locale(languageToLoad);
              Locale.setDefault(locale);
              config = new Configuration();
              config.locale = locale;
              getBaseContext().getResources().updateConfiguration(config,
                      getBaseContext().getResources().getDisplayMetrics());
              this.setContentView(R.layout.activity_main);
              Intent in = getBaseContext().getPackageManager()
                      .getLaunchIntentForPackage(getBaseContext().getPackageName());
              in.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
              startActivity(in);
              break;
  
          default:
  
              break;
      }
      return super.onOptionsItemSelected(item);
  }
  </code></pre>