]> git.lyx.org Git - features.git/blobdiff - lib/lyx2lyx/lyx2lyx_tools.py
Prevent multiple insertion of language switch at document body
[features.git] / lib / lyx2lyx / lyx2lyx_tools.py
index 4177ef8e479a9ed298daaf9ac4ec29928c4ca857..0c3251970274005fb82f4a1e33ead86578414948 100644 (file)
@@ -747,7 +747,7 @@ def revert_language(document, lyxname, babelname, polyglossianame):
     # With babel, we need to add the language options
     if with_babel and (primary or secondary):
         insert_document_option(document, babelname)
-        if secondary:
+        if secondary and document.body[10] != "selectlanguage{%s}" % document.language:
             # 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",