code: protected CmsXmlContentProperty createTemplateContextsPropertyDefinition(
          I_CmsTemplateContextProvider contextProvider,
          Locale locale) {
  
          if (contextProvider == null) {
              return null;
          }
          List<String> contextOptions = new ArrayList<String>();
          for (CmsTemplateContext context : contextProvider.getAllContexts().values()) {
              contextOptions.add(context.getKey() + ":" + context.getLocalizedName(locale));
          }
          String widgetConfig = CmsStringUtil.listAsString(contextOptions, "|");
  
          String niceName = Messages.get().getBundle(locale).key(Messages.GUI_SETTING_TEMPLATE_CONTEXTS_NAME_0);
          String description = Messages.get().getBundle(locale).key(Messages.GUI_SETTING_TEMPLATE_CONTEXTS_DESCRIPTION_0);
          CmsXmlContentProperty propDef = new CmsXmlContentProperty(
              CmsTemplateContextInfo.SETTING,
              "string",
              "multicheck",
              widgetConfig,
              null,
              null,
              "",
              niceName,
              description,
              "",
              "false");
          return propDef;
      }
docs: Creates the setting definition for the templateContexts setting.<p>
  
  @param contextProvider the context provider
  @param locale the current locale
  
  @return the setting definition