public static XElement LocalizeValue(this XElement element, string name, LocalGameClientLocalization localization, bool writeKey = false)
        {
            return(element.Select(name,
                                  e =>
            {
                if (writeKey)
                {
                    e.SetAttributeValue("key", e.Value);
                }

                e.Value = localization.GetLocalizedString(e.Value);
            }));
        }
 public static XElement LocalizeValue(this XElement element, LocalGameClientLocalization localization)
 {
     return(element.LocalizeValue(null, localization));
 }
 public static XElement LocalizeValue(this XElement element, LocalGameClientLocalization localization)
 {
     return(XElementExtensions.LocalizeValue(element, null, localization));
 }
 public static XElement ProcessTankModuleListNode(this XElement element, string name, string elementName, LocalGameClientLocalization localization, Action <XElement> additionalProcessing = null)
 {
     return(element.Select(name, list =>
     {
         list.ProcessElements(
             e => e.NameToAttribute(elementName)
             .LocalizeValue("userString", localization)
             .TextToBooleanAttribute("shared", "shared")
             .ProcessElements("unlocks", u => u.TextToAttribute("key"))
             .ApplyProcessing(additionalProcessing));
     }));
 }
 public static XElement LocalizeValue(this XElement element, string name, LocalGameClientLocalization localization)
 {
     return(element.Select(name, e => e.Value = localization.GetLocalizedString(e.Value)));
 }