title: change Language in android using Localization
body: <p>I need to change localization of  labels in my app. I have created two string folders for English and Hindi language. When I change Localization it’s working fine and all label show in hindi. </p>
  
  <pre><code>private void setLanguage(Boolean changeLang) {
      if (changeLang) {
          Locale.setDefault(new Locale("hi", "IN"));
          Configuration config = new Configuration();
          config = viewDashboard.getBaseContext().getResources().getConfiguration();
          config.locale = new Locale("hi", "IN");
          viewDashboard
                  .getBaseContext()
                  .getResources()
                  .updateConfiguration(
                          config,
                          viewDashboard.getBaseContext().getResources()
                                  .getDisplayMetrics());
  
      } else {
          Locale.setDefault(new Locale("en", "EN"));
          Configuration config = new Configuration();
          config = viewDashboard.getBaseContext().getResources().getConfiguration();
          config.locale = new Locale("en", "EN");
          viewDashboard
                  .getBaseContext()
                  .getResources()
                  .updateConfiguration(
                          config,
                          viewDashboard.getBaseContext().getResources()
                                  .getDisplayMetrics());
  
      }
  }
  </code></pre>
  
  <p>But  It also change date picker language to Hindi which I don’t need.
  In same way  few textviews also show Hindi fonts i.e where I have set  date from date picker or show total amount after calculation and Dialog box ‘OK’ and ‘Cancel’ convert into Hindi that I don’t want.
  My question is how can  I prevent date picker and dialog box button label from converting to Hindi after changing localization programmatically.</p>