title: How to list/select the installed languages on Android?
body: <p>I want to make a small app that, with one or two clicks, will switch the system language between two, three or more prefered languages, selected before-hand from the "official" language list, i.e. the one that appears in Quick settings > Settings > Language &amp; input > Language.</p>
  
  <p>How do I get this list programatically? Is this the locale list, available from Locale.getAvailableLocales()? Should I get to the languages from the locales? Thank you!</p>
  
  <p><img src="https://i.stack.imgur.com/XZ7qw.png" alt="enter image description here"></p>
  
  <p>EDIT - This is what I've done so far:</p>
  
  <pre><code>  private List&lt;Model&gt; getModel() {
      Locale[] locales = Locale.getAvailableLocales();
      List&lt;Model&gt; list = new ArrayList&lt;Model&gt;();
      for (int i=0; i&lt;locales.length; i++) {
          list.add(get(locales[i].getDisplayLanguage()));
      }
      return list;
    }
  
    private Model get(String s) {
      return new Model(s);
    }
  </code></pre>
  
  <p>I'm looking those options now:</p>
  
  <pre><code>Locale.getDefault().getLanguage()        ---&gt; en     
  Locale.getDefault().getISO3Language()    ---&gt; eng
  Locale.getDefault().getCountry()         ---&gt; US
  Locale.getDefault().getISO3Country()     ---&gt; USA
  Locale.getDefault().toString()           ---&gt; en_US
  Locale.getDefault().getDisplayLanguage() ---&gt; English
  Locale.getDefault().getDisplayCountry()  ---&gt; United States
  Locale.getDefault().getDisplayName()     ---&gt; English (United States)
  </code></pre>
  
  <p>from <a href="https://stackoverflow.com/a/4212417/1086511">here</a>.</p>
  
  <p>EDIT 2 - 2 more images, showing the end of the languages list, where reside the options for chinese.</p>
  
  <p><img src="https://i.stack.imgur.com/odUnZ.png" alt="enter image description here"></p>
  
  <p>This is the list from the system.</p>
  
  <p><img src="https://i.stack.imgur.com/214g9.png" alt="enter image description here"></p>
  
  <p>This list was done with the following code:</p>
  
  <pre><code>Locale[] locales = Locale.getAvailableLocales();
  List&lt;Model&gt; list = new ArrayList&lt;Model&gt;();
  for (int i=0; i&lt;locales.length; i++) {
      list.add(get(locales[i].getDisplayLanguage()+"|"+
              locales[i].toString()+"|"+
              locales[i].getDisplayName()
              ));
  }
  return list;
  </code></pre>
  
  <p>Now there must be a way to get to the first list from the second list, perhaps accessing some system hidden files?</p>
  
  <p>EDIT 3 - I added the following code and it shows the chinese, portuguese and spanish special characters (UTF-8) without problem:</p>
  
  <pre><code>list.add(get("Português (Brasil)"));
  list.add(get("English (US)"));
  list.add(get("中国（简体）"));
  list.add(get("Español (Venezuela)"));
  </code></pre>
  
  <p>Now how do I get from here to actually change the system language (without opening the intent/activity like below?</p>
  
  <pre><code>Intent intent = new Intent(Settings.ACTION_LOCALE_SETTINGS);
  startActivity(intent);
  </code></pre>