code: public static void setFactory(NlsMessageFactory factory) {
  
      if (NlsAccess.factory == null) {
        NlsAccess.factory = factory;
      } else if (NlsAccess.factory != factory) {
        LOG.warn("NlsTemplateResolver is already set to {} and will not be changed to {}.", NlsAccess.factory,
            factory);
      }
    }
docs: This method sets (overrides) the {@link NlsMessageFactory}. This allows to exchange the {@link NlsMessageFactory}
  and thereby the implementation of {@link net.sf.mmm.util.nls.api.NlsMessage}. <br>
  The desired behavior of a universal translator can depend from the situation where it is used. E.g. a client
  application could use the {@link java.util.Locale#getDefault() "default locale"} to choose the destination
  language. In a multi-user server application a {@link ThreadLocal} may be used to retrieve the appropriate
  {@link java.util.Locale locale}. <br>
  <b>WARNING:</b><br>
  This is only a back-door for simple applications or test situations. Please try to avoid using this feature as well
  as {@link net.sf.mmm.util.nls.api.NlsMessage#getLocalizedMessage()} and solve this issue with IoC strategies (using
  non-final static fields like here is evil). <br>
  <b>ATTENTION:</b><br>
  No synchronization is performed setting the factory instance. This assumes that an assignment is an atomic
  operation in the JVM you are using. Additionally this method should only be invoked in the initialization phase of
  your application.
  
  @param factory the factory-instance to use.