title: Reload storyboard to change locale
body: <p>I am using a single, localized Storyboard for my application. The app has to have an option to change language on the fly. So far I figured out how to change the language which is used during the app launch:</p>
  
  <pre><code>[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"de", @"en", @"fr", nil] forKey:@"AppleLanguages"];
  [[NSUserDefaults standardUserDefaults] synchronize]; //to make the change immediate
  </code></pre>
  
  <p>And managed to reload my entire application by removing all subviews of the key window, reloading the initial view controller from the storyboard and making it the new root view controller. (It has some problems, like managing open resources, but it can be done.)</p>
  
  <p>The only thing I couldn't figure out is how do I force iOS to reload the storyboard in the new language? It seems storyboards are cached somehow, and <code>-UIStoryboad:stroyboardWithName:fromNib</code> does not reload it entirely, so it appears in the last language.</p>
  
  <p>I've already considered two other options:</p>
  
  <ul>
  <li><p>having different storyboard files for each language (it is unamanageable, I don't want to do this)</p></li>
  <li><p>using event listeners in all of my view controllers which respond to a language change and set the new strings on the UI (which is also has to be called every time any interface element gets instantiated from the storyboard). This solution requires more time, than we'd like to spend with this, and also highly increases the possibility of bugs.</p></li>
  </ul>
  
  <p>Is there some more clever way? I don't want to keep the current state of my application, so restarting it like it was killed and realunched seems a reasonable resolution.</p>