Changing language from my app works weirdly
<p>I am changing the language in <code>MainActivity.onCreate()</code> like this:</p>

<pre><code>Locale locale = new Locale("cs");
Configuration config = getResources().getConfiguration();
config.locale = locale;
getResources().updateConfiguration(config, getResources().getDisplayMetrics());
</code></pre>

<p>It works OK at first look, the layout is in he correct language. But when I open the menu, it is localized to the system default language (English)! To find out what's happening I checked every 30ms (via <code>Timer</code>) what is the value of <code>getResources().getConfiguration().locale.getLanguage()</code>. About 50ms after <code>onResume()</code> is finished, the language magically changes from "cs" to "en".</p>

<p>I tried to set it back after I detect the change, but it was not working. What worked was if I set the language again to "cs" in <code>onCreateOptionsMenu()</code>.</p>

<p><strong>Important note:</strong> this happens only if the app is started after it was previously killed. By "killed" I don't mean <code>MainActivity.finish()</code> is called but rather that the app is completely removed from the memory including static fields (in practice this happens after install or if the system kills it due to low memory).</p>

<p><strong>UPDATE:</strong> Another issue I noticed is that when I change the orientation of the phone to landscape, my app still uses portrait layout and not the layout from layout-land folder.</p>
