]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Implement l7n for nomenclature.
[lyx.git] / src / output_latex.cpp
index 4ef1d456243f87ad140c8973b6ac299210a6b299..1431bbb321254fa7e32da97211f3806401b09196 100644 (file)
@@ -532,6 +532,14 @@ void popLanguageName()
 }
 
 
+string const & openLanguageName()
+{
+       OutputState * state = getOutputState();
+
+       return openLanguageName(state);
+}
+
+
 namespace {
 
 void addArgInsets(Paragraph const & par, string const & prefix,
@@ -882,7 +890,7 @@ void TeXOnePar(Buffer const & buf,
                        }
                        // With CJK, the CJK tag has to be closed first (see below)
                        if (runparams.encoding->package() != Encoding::CJK
-                           && par_lang != openLanguageName(state)
+                           && (par_lang != openLanguageName(state) || localswitch)
                            && !par_lang.empty()) {
                                string bc = use_polyglossia ?
                                          getPolyglossiaBegin(lang_begin_command, par_lang, par_language->polyglossiaOpts())
@@ -1028,8 +1036,8 @@ void TeXOnePar(Buffer const & buf,
                        break;
                }
        }
-
-       // fall through possible
+       // possible
+       // fall through
        default:
                // we don't need it for the last paragraph!!!
                if (nextpar)