title: Change locale in android app (onto Hindi)
body: <p>Creating multi languages support for the app with possibility to change language in App settings.</p>
  
  <p>As for now everything works fine for English, Spanish, Franch, Russian languages,
  but doesn't work for Hindi and Chineese.</p>
  
  <p>1) I specify the language name in original language 
  but in the app instead of हिन्दी I can see "Hindi".</p>
  
  <p>\res\values-hi\arrays.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
      &lt;string-array name="languages"&gt;
          &lt;item name="english"&gt;English&lt;/item&gt;
          &lt;item name="russian"&gt;Русский&lt;/item&gt;
          &lt;item name="spanish"&gt;Espagnol&lt;/item&gt;
          &lt;item name="russian"&gt;Français&lt;/item&gt;
          &lt;item name="chineese"&gt;中国&lt;/item&gt;
          &lt;item name="hindi"&gt;हिन्दी&lt;/item&gt;
      &lt;/string-array&gt;
      &lt;string-array name="languagesValues"&gt;
           &lt;item name="english"&gt;en&lt;/item&gt;
          &lt;item name="russian"&gt;ru&lt;/item&gt;
          &lt;item name="spanish"&gt;es&lt;/item&gt;
          &lt;item name="russian"&gt;fr&lt;/item&gt;
          &lt;item name="chineese"&gt;zh-CN&lt;/item&gt;
          &lt;item name="hindi"&gt;hi&lt;/item&gt;
      &lt;/string-array&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>2) End after selecting "Hindi" - actually default (English) is being selected.<br>
  \res\values-hi\strings.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
      &lt;string name="app_name"&gt;लकी बीनने&lt;/string&gt;
      &lt;string name="score"&gt;0000&lt;/string&gt;
      &lt;string name="settings"&gt;सेटिंग&lt;/string&gt;
      &lt;string name="start_button"&gt;प्रारंभ&lt;/string&gt;
      &lt;string name="about_button"&gt;के बारे में&lt;/string&gt;
      &lt;string name="about"&gt;लियोनिद द्वारा बनाया गया&lt;/string&gt;
      &lt;string name="feedback"&gt;प्रतिक्रिया भेजें &lt;/string&gt;
      &lt;string name="high_score"&gt;उच्च स्कोर के&lt;/string&gt;
      &lt;string name="score_set"&gt;स्कोर निर्धारित किया गया है \r\nमें:&lt;/string&gt;
      &lt;string name="game_over"&gt;खेल खत्म&lt;/string&gt;
  </code></pre>
  
  <p>....</p>
  
  <p>Saving locale in Preferences.</p>
  
  <pre><code>public class Settings extends PreferenceActivity {
  
      Locale myLocale;
      static boolean localeChanged;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          addPreferencesFromResource(R.xml.preferences);
  
  
          // language changing
          Preference langPreference = getPreferenceScreen().findPreference(
                  "language");
          langPreference.setOnPreferenceChangeListener(languageChangeListener);
      }
  
      Preference.OnPreferenceChangeListener languageChangeListener = new OnPreferenceChangeListener() {
  
          @Override
          public boolean onPreferenceChange(Preference preference, Object newValue) {
  
              switch (newValue.toString()) {
              case "en":
                  setLocale("en");
                  break;
  
              case "ru":
                  setLocale("ru");
                  break;
  
              case "fr":
                  setLocale("fr");
                  break;
  
              case "es":
                  setLocale("es");
                  break;
  
              case "zh-CN":
                  setLocale("zh-CN");
                  break;
  
              case "hi":
                  setLocale("hi");
                  break;
  
              }
  
              localeChanged = true;
              return true;
          }
      };
  
      // * manually changing locale/
      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);
          Intent refresh = new Intent(this, Settings.class);
          startActivity(refresh);
          finish();
      }
  </code></pre>
  
  <p>What is wrong? Is something wrong in my code, or in my device?</p>