protected String buildLocalizedValuesForEnumValue(String enumValue, Map<String, String> localizedValues) { Properties result = new Properties(); for (Map.Entry<String, String> entry : localizedValues.entrySet()) { String key = entry.getKey(); key = key.substring(key.indexOf("/") + 1); if (key.equals(enumValue)) { result.put(entry.getKey(), entry.getValue()); } } return LocaleHelper.convertPropertiesToString(result); }
public static String convertFromSimpleKeyLocales(String enumValue, String localeBundle) { Properties result = new Properties(); Properties properties = loadProperties(localeBundle); if (properties != null) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { String key = (String) entry.getKey(); result.put(key + "/" + enumValue, entry.getValue()); } } return convertPropertiesToString(result); }
public static String convertToSimpleKeyLocales(String localeBundle) { Properties result = new Properties(); Properties properties = loadProperties(localeBundle); if (properties != null) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { String key = (String) entry.getKey(); key = key.substring(0, key.indexOf("/")); result.put(key, entry.getValue()); } } return convertPropertiesToString(result); }
public String getValue() { Properties properties = new Properties(); for (Map.Entry<Locale, TextField> entry : textFieldMap.entrySet()) { if (!entry.getValue().getRawValue().isEmpty()) { properties.setProperty(entry.getKey().toString(), entry.getValue().getRawValue()); } } return LocaleHelper.convertPropertiesToString(properties); }
public String getLocalizedValues() { Properties properties = new Properties(); for (CategoryAttributeEnumValue enumValue : enumValuesDs.getItems()) { properties.putAll(LocaleHelper.getLocalizedValuesMap(enumValue.getLocalizedValues())); } enumerationLocales = LocaleHelper.convertPropertiesToString(properties); return enumerationLocales; }