bool ParseLanguage(ref string sBodyStruct, ref string sString)
{
sString = "";
// remove any spaces at the beginning and the end
sBodyStruct = sBodyStruct.Trim();
if (sBodyStruct[0] == '(')
{ // Language list
// remove the opening paranthesis
if (!FindAndRemove( ref sBodyStruct, '('))
return false;
// TO DO
// Logic for parsing language list is not yet
// written. To be added in the future.
// remove the closing paranthesis
if (!FindAndRemove( ref sBodyStruct, ')'))
return false;
}
else
{ // One or no language
if (!ParseQuotedString(ref sBodyStruct, ref sString))
{
Log(LogTypeEnum.ERROR, "Failed getting Content Language.");
return false;
}
}
return true;
}