title: Changing Application Culture at Runtime Failure
body: <p>All, I have a localised WinForms application. I have created a facility where users are able to change the required culture/language of the application at runtime. To avoid doing anything fancy, when the use does want to change the culture they are prompted that the application must be restarted for the change in culture to take effect (reasonable as this is not going to happen often if at all). I then store the new language required as a string in one of my settings XML files ("de-DE", "en-US", "en-GB" et al.). Then when the application restarts, if required I switch to the required culture:</p>
  
  <pre><code>// Main constructor.
  public SqlEditorForm(string[] args) 
  {
      // Load settings.
      username = Environment.UserName;
      userSettings = UserSettings.Instance();
      advUserSettings = AdvanceUserSettings.Instance();
      CheckChangeCurrentCulture();
  
      isInitialising = true;
      InitializeComponent();
  
      ...
  }
  
  private void CheckChangeCurrentCulture()
  {
      //if (!Debugger.IsAttached)
      //  Debugger.Launch();
      if (advUserSettings.DefaultCulture)
          return;
      else
      {
          CultureInfo culture = new CultureInfo(advUserSettings.CustomCultureString);
          Thread.CurrentThread.CurrentCulture = culture;
          Thread.CurrentThread.CurrentUICulture = culture;
      }
  }
  </code></pre>
  
  <p>Now when running in debug/release mode from VS2012, this mechanism works fine. However, when I install the application on (running Windows 7 (x86/x64)) various machines this mechanism no longer works, that is to say that the culture does not switch from the machines default EVER.</p>
  
  <p>I have attached the debugger to the installed application and the code to change the culture is being invoked and the logic seems to be working and no exceptions are thrown, but the culture/language does not change. I have been though many questions on SO but cannot find an applicable one that covers this particular issue.</p>
  
  <p><strong>Why is this mechanism working from VS2012, but not for the installed application? What do I need to do in order to achieve my desired behaviour?</strong></p>
  
  <p>Thanks for your time.</p>
  
  <p><em>Note, I have also tried replacing the call to <code>CheckChangeCurrentCulture();</code> with:</em></p>
  
  <pre><code>Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("de-DE");
  Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("de-DE");
  </code></pre>
  
  <p><em>which also works within VS2012 (Debug and Release modes) but not with the installed application. I have also changed the machines culture <kbd>Start</kbd> -> <kbd>Control Panel</kbd> -> <kbd>Region and Language</kbd> to German ("de-DE") expecting the application and the .NET framework to detect I have that culture available and use it. This also failed for the installed application.</em></p>