# With babel, we need to add the language options
if with_babel and (primary or secondary):
insert_document_option(document, babelname)
# With babel, we need to add the language options
if with_babel and (primary or secondary):
insert_document_option(document, babelname)
# Since the user options are always placed after the babel options,
# we need to reset the main language
document.body[2 : 2] = ["\\begin_layout Standard",
"\\begin_inset ERT", "status open", "",
"\\begin_layout Plain Layout", "", "",
"\\backslash",
# Since the user options are always placed after the babel options,
# we need to reset the main language
document.body[2 : 2] = ["\\begin_layout Standard",
"\\begin_inset ERT", "status open", "",
"\\begin_layout Plain Layout", "", "",
"\\backslash",
"\\end_layout", "", "\\end_inset", "", "",
"\\end_layout", ""]
"\\end_layout", "", "\\end_inset", "", "",
"\\end_layout", ""]