16 using System.Globalization;
18 using erminas.SmartAPI.CMS.Project;
19 using erminas.SmartAPI.CMS.Project.ContentClasses.Elements;
20 using erminas.SmartAPI.Utils;
22 namespace erminas.SmartAPI.CMS.Converter
24 internal class LocaleConverter : IAttributeConverter<ISystemLocale>
26 public ISystemLocale ConvertFrom(
IProjectObject parent, XmlElement element, RedDotAttribute attribute)
28 string value = element.GetAttributeValue(attribute.ElementName);
29 var lcid = element.IsAttributeSet(parent, attribute.ElementName) && !value.Contains(
"EmptyBuffer")
38 public bool IsReadOnly
43 public void WriteTo(
IProjectObject parent, IXmlReadWriteWrapper element, RedDotAttribute attribute,
46 element.SetAttributeValue(attribute.ElementName,
47 value == null ? null : value.LCID.ToString(CultureInfo.InvariantCulture));