code: private String getValue(CmsObject cms, I_CmsWidgetParameter param) {
  
          String value = m_messages.key(m_bundleKey);
          if ((CmsStringUtil.isNotEmptyOrWhitespaceOnly(param.getStringValue(cms))
              && !value.equals(param.getStringValue(cms))) || value.startsWith(CmsMessages.UNKNOWN_KEY_EXTENSION)) {
              // saved value is provided and different from localized value in bundle or no value found in bundle, use it
              value = param.getStringValue(cms);
              // replace OpenCms macro syntax with message bundle arguments
              Matcher matcher = PATTERN_MACRO.matcher(value);
              while (matcher.matches()) {
                  int startIndex = matcher.start(1);
                  int endIndex = matcher.end(3);
                  String number = matcher.group(2);
                  value = value.substring(0, startIndex) + "{" + number + "}" + value.substring(endIndex);
                  matcher = PATTERN_MACRO.matcher(value);
              }
  
          }
          return value;
      }
docs: Determine value to show in editor.<p>
  @param cms an initialized instance of a CmsObject
  @param param the widget parameter to generate the widget for
  
  @return value to show in editor