title: Set Locale in Worker
body: <p>I am using a worker to do some tasks in the background. </p>
  
  <p>When I try to use libraries that depend on the locale (e.g. use spark.formatters.DateTimeFormatter) I notice that they fail, since the locale in the worker is not set at all (e.g. dateTimeFormatter.actualLocaleIDName is null).</p>
  
  <p><strong>How do I set the locale in the worker?</strong></p>
  
  <p>Things I tried that don't work:</p>
  
  <ul>
  <li>FlexGlobals.topLevelApplication.setStyle("locale",LocaleID.DEFAULT); 
  <strong>FlexGlobals.topLevelApplication is null</strong></li>
  <li><p>StyleManager.getStyleManager(null) <strong>also returns null</strong>, making it impossible to set the property there</p></li>
  <li><p>StyleManager.getStyleManager(this.moduleFactory) <strong>null once more</strong></p></li>
  </ul>
  
  <p>Things that work but do <strong>not</strong> solve the problem for me:</p>
  
  <ul>
  <li>Setting the locale style property manually on all DateTimeFormatter etc. instances. This would mean modifying third party library code and maintaining a fork ourselves.</li>
  </ul>
  
  <p>Thanks!</p>
  
  <p>Michael</p>