added sanity check for language and parent
Merge pull request #2147 from digi604/sanity

added sanity check for language and parent