code: protected void initConfiguration(CmsObject cms, I_CmsWidgetParameter param) {
  
          // set the default bundle key
          m_bundleKey = param.getName();
          // set the default locale for XML contents
          m_locale = cms.getRequestContext().getLocale();
          try {
              I_CmsXmlContentValue value = (I_CmsXmlContentValue)param;
              m_locale = value.getLocale();
          } catch (Exception e) {
              // ignore, this is no XML content
          }
  
          // check the message bundle
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getConfiguration())) {
              //initialize messages, the optional bundle key name and the optional locale from configuration String
              String bundleName = "";
              List<String> configs = CmsStringUtil.splitAsList(getConfiguration(), '|');
              Iterator<String> i = configs.iterator();
              while (i.hasNext()) {
                  String config = i.next();
                  if (config.startsWith(OPTION_KEY)) {
                      m_bundleKey = config.substring(OPTION_KEY.length());
                  } else if (config.startsWith(OPTION_LOCALE)) {
                      m_locale = CmsLocaleManager.getLocale(config.substring(OPTION_LOCALE.length()));
                  } else {
                      bundleName = config;
                  }
              }
              // create messages object
              m_messages = new CmsMessages(bundleName, m_locale);
          } else {
              // initialize empty messages object to avoid NPE
              m_messages = new CmsMessages("", m_locale);
          }
      }
docs: Initializes the localized bundle to get the value from, the optional key name and the optional locale.<p>
  
  @param cms an initialized instance of a CmsObject
  @param param the widget parameter to generate the widget for