How to choose Locale from string
<p>I am using PreferenceActivity for storing language. This is my XML.</p>

<pre><code>&lt;item&gt;US&lt;/item&gt;
        &lt;item&gt;UK&lt;/item&gt;
        &lt;item&gt;CANADA&lt;/item&gt;
        &lt;item&gt;CANADA_FRENCH&lt;/item&gt;
        &lt;item&gt;CHINESE&lt;/item&gt;
        &lt;item&gt;FRENCH&lt;/item&gt;
        &lt;item&gt;GERMAN&lt;/item&gt;
        &lt;item&gt;ITALIAN&lt;/item&gt;
        &lt;item&gt;JAPANESE&lt;/item&gt;

&lt;string-array name="listOfLanguagesValues"&gt;
        &lt;item&gt;US&lt;/item&gt;
        &lt;item&gt;UK&lt;/item&gt;
        &lt;item&gt;CANADA&lt;/item&gt;
        &lt;item&gt;CANADA_FRENCH&lt;/item&gt;
        &lt;item&gt;CHINESE&lt;/item&gt;
        &lt;item&gt;FRENCH&lt;/item&gt;
        &lt;item&gt;GERMAN&lt;/item&gt;
        &lt;item&gt;ITALIAN&lt;/item&gt;
        &lt;item&gt;JAPANESE&lt;/item&gt;
</code></pre>

<p>Then i read save dlanguage with</p>

<pre><code>String selectedLanguage = sharedPreferences.getString("listOfLanguages", "NULL");        
</code></pre>

<p>but i don't know how to use now <code>LOCAL.SELECTED LANGUAGE</code>. This languages are all from <code>LOCAL.</code> options</p>

<p>Can i somehow cast it to local?</p>
