code: public CmsWorkplaceMessages getMessages(Locale locale) {
  
          CmsWorkplaceMessages result = m_messages.get(locale);
          if (result != null) {
              // messages have already been read
              return result;
          }
  
          // messages have not been read so far
          synchronized (this) {
              // check again
              result = m_messages.get(locale);
              if (result == null) {
                  result = new CmsWorkplaceMessages(locale);
                  m_messages.put(locale, result);
              }
          }
          return result;
      }
docs: Returns the {@link CmsWorkplaceMessages} for the given locale.<p>
  
  The workplace messages are a collection of resource bundles, containing the messages
  for all OpenCms core bundles and of all initialized modules.<p>
  
  Please note that the message objects are cached internally.
  The returned message object should therefore never be modified directly in any way.<p>
  
  @param locale the locale to get the messages for
  
  @return the {@link CmsWorkplaceMessages} for the given locale