Set Language.Name while loading XML translation file

This commit is contained in:
Waldi Ravens 2015-08-24 15:57:31 +02:00
parent fec89b579d
commit 05a05d0006
2 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,8 @@ namespace Nikse.SubtitleEdit.Logic
{ {
if (!reader.IsEmptyElement && reader.Depth > 0) if (!reader.IsEmptyElement && reader.Depth > 0)
name.Append('/').Append(reader.Name); name.Append('/').Append(reader.Name);
else if (reader.Depth == 0)
language.Name = reader["Name"];
} }
else if (reader.NodeType == XmlNodeType.EndElement) else if (reader.NodeType == XmlNodeType.EndElement)
{ {

View File

@ -39,6 +39,8 @@ namespace Nikse.SubtitleEdit.Logic
{ {
if (!reader.IsEmptyElement && reader.Depth > 0) if (!reader.IsEmptyElement && reader.Depth > 0)
name.Append('/').Append(reader.Name); name.Append('/').Append(reader.Name);
else if (reader.Depth == 0)
language.Name = reader[""Name""];
} }
else if (reader.NodeType == XmlNodeType.EndElement) else if (reader.NodeType == XmlNodeType.EndElement)
{ {