We moved the ToC insertion from the parser to ParserOutput::getText() in T287767 but forgot to ensure that the ToC contents are properly language converted. This was hacked into ParserOutput::getText() in T295187 but some of the state from Parser isn't available to ParserOutput.
This is the follow-up task to make sure the new code matches the old behavior precisely. In particular:
- ensure that ParserOptions::disableContentConversion() is respected. (It seems like this could actually be deprecated and a new Content type created for Conversion tables to have the same effect.)
- ensure that __NOCONTENTCONVERT__ is respected
- ensure that any differences between Parser::getTargetLanguage() and ::getContentLanguage() are resolved.