code: protected String getMessage(CmsMessageContainer container) {
  
          CmsObject cms = getCmsObject();
          String result;
          if ((cms == null) || (cms.getRequestContext().getLocale() == null)) {
              result = container.key();
          } else {
              result = container.key(cms.getRequestContext().getLocale());
          }
          return result;
      }
docs: Internally localizes the given <code>CmsMessageContainer</code> to a String. <p>
  
  If the user request context is at hand, the user's locale will be chosen. If
  no user request context is available, the default locale is used. <p>
  
  @param container the message container that allows localization of the represented message.
  
  @return the message String of the container argument localized to the user's locale (if available) or
  to the default locale.