public XmlElement ToXml(XmlDocument document)
{
const string Ns = XmlNamespaces.ProjectConfigurationNamespace;
XmlElement result = document.CreateElement("locale", Ns);
XmlElement formatElem = result.AppendElement(document.CreateElement("format", Ns));
result.SetAttribute("name", this.Name);
result.SetAttribute("language", this.Language);
result.SetAttribute("dictionaryNames", string.Join(",", this.DictionaryNames));
result.SetAttribute("resourceNames", string.Join(",", this.ResourceNames));
formatElem.SetAttribute("culture", this.Culture.Name);
formatElem.SetAttribute("shortDate", shortDateFormat);
formatElem.SetAttribute("longDate", longDateFormat);
return result;
}