Пример #1
0
        /// <summary>
        /// Used for translating string array
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        private XElement ProcessStringArray(TranslateAPI.TranslateAPIBase translator, XElement e)
        {
            XElement OutputEelement = new XElement("string-array", e.Attribute("name"));

            //loop through the invidual strings and process them one at a time
            foreach (XElement item in e.Elements("item"))
            {
                OutputEelement.Add(new XElement("item", EscapeString(translator.TranslateString(item.Value))));
            }

            return OutputEelement;
        }
Пример #2
0
        /// <summary>
        /// Used for translating strings
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        private XElement ProcessString(TranslateAPI.TranslateAPIBase translator, XElement e)
        {
            XElement OutputElement = new XElement("string");
            OutputElement.Add(new XAttribute("name", e.Attribute("name").Value));

            //Translate the individual string
            OutputElement.Value = EscapeString(translator.TranslateString(e.Value));

            return OutputElement;
        }