title: Using list preference in Android
body: <p>I have a text to speech application where the user can select a language and also select a male or female voice. The problem is that for each language there are different strings used to called the male and female voice but in my preference I only have two options (male and female).</p>
  
  <pre><code>&lt;string-array name="Language"&gt;
      &lt;item&gt;English (US)&lt;/item&gt;
      &lt;item&gt;English (UK)&lt;/item&gt;
      &lt;item&gt;French (France)&lt;/item&gt;
      &lt;item&gt;Spanish (Spain)&lt;/item&gt;
      &lt;item&gt;Italian&lt;/item&gt;
  &lt;/string-array&gt;
  
  &lt;string-array name="languageAlias"&gt;
      &lt;item&gt;"en-US"&lt;/item&gt;
      &lt;item&gt;"en-GB"&lt;/item&gt;
      &lt;item&gt;"fr-FR"&lt;/item&gt;
      &lt;item&gt;"es-ES"&lt;/item&gt;
      &lt;item&gt;"it-IT"&lt;/item&gt;
  &lt;/string-array&gt;
  
  &lt;string-array name="Voice"&gt;
      &lt;item&gt;Male&lt;/item&gt;
      &lt;item&gt;Female&lt;/item&gt;
  &lt;/string-array&gt;
  
  &lt;string-array name="VoiceAlias"&gt;
      &lt;item&gt;"usenglishmale"&lt;/item&gt;
      &lt;item&gt;"usenglishfemale"&lt;/item&gt;
      &lt;item&gt;"ukenglishmale"&lt;/item&gt;
      &lt;item&gt;"ukenglishfemale"&lt;/item&gt;
      &lt;item&gt;"eurfrenchmale"&lt;/item&gt;
      &lt;item&gt;"eurfrenchfemale"&lt;/item&gt;
      &lt;item&gt;"eurspanishmale"&lt;/item&gt;
      &lt;item&gt;"eurspanishfemale"&lt;/item&gt;
      &lt;item&gt;"euritalianmale"&lt;/item&gt;
      &lt;item&gt;"euritalianfemale"&lt;/item&gt;        
  &lt;/string-array&gt;
  </code></pre>
  
  <p>I'm trying to find a way to only reference the relevant male and female voiceAlias depending on the language selected. Is it possible to do this here or do I have to write some code which changes the values of the voiceAlias array depending on the language selected? </p>
  
  <p>Thanks in Advance</p>