code: private Map<String, String> convertSettingValues(CmsResource resource, Map<String, String> settings, Locale locale)
      throws CmsException {
  
          CmsObject cms = getCmsObject();
          Locale origLocale = cms.getRequestContext().getLocale();
          try {
              cms.getRequestContext().setLocale(locale);
              Map<String, CmsXmlContentProperty> settingsConf = OpenCms.getADEManager().getElementSettings(cms, resource);
              Map<String, String> changedSettings = new HashMap<String, String>();
              if (settings != null) {
                  for (Map.Entry<String, String> entry : settings.entrySet()) {
                      String settingName = entry.getKey();
                      String settingType = "string";
                      if (settingsConf.get(settingName) != null) {
                          settingType = settingsConf.get(settingName).getType();
                      }
                      changedSettings.put(
                          settingName,
                          CmsXmlContentPropertyHelper.getPropValueIds(getCmsObject(), settingType, entry.getValue()));
                  }
              }
              return changedSettings;
          } finally {
              cms.getRequestContext().setLocale(origLocale);
          }
      }
docs: Converts the given setting values according to the setting configuration of the given resource.<p>
  
  @param resource the resource
  @param settings the settings to convert
  @param locale the locale used for accessing the element settings
  
  @return the converted settings
  @throws CmsException if something goes wrong