public LocalizedText ReadLocalizedText(string fieldName)
{
object token = null;
if (!ReadField(fieldName, out token))
{
return null;
}
string locale = null;
string text = null;
var value = token as Dictionary<string, object>;
if (value == null)
{
text = token as string;
if (text != null)
{
return new LocalizedText(text);
}
return null;
}
try
{
m_stack.Push(value);
if (value.ContainsKey("Locale"))
{
locale = ReadString("Locale");
}
if (value.ContainsKey("Text"))
{
text = ReadString("Text");
}
}
finally
{
m_stack.Pop();
}
return new LocalizedText(locale, text);
}