]> git.lyx.org Git - lyx.git/commitdiff
BufferParams.cpp: fix bug 3569:
authorUwe Stöhr <uwestoehr@web.de>
Tue, 8 May 2007 23:53:35 +0000 (23:53 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 8 May 2007 23:53:35 +0000 (23:53 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=3569

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18238 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp

index d21f5117e053220e60d3939f437aa638a5418772..332b03da055c018e76a2b8487e8ea869c5f9ffb6 100644 (file)
@@ -1384,8 +1384,14 @@ string const BufferParams::babelCall(string const & lang_opts) const
        // suppress the babel call when there is no babel language defined
        // in the lib/languages file
        if (lyxrc.language_global_options && tmp == "\\usepackage{babel}" &&
-               language->babel().empty() )
-               tmp = string("");
+               language->babel().empty() ) {
+               // if the armscii8 or a CJK encoding is used, babel has to be called
+               // for foreign languages
+               if (!lang_opts.empty())
+                       tmp = string("\\usepackage[") + lang_opts + "]{babel}";
+               else
+                       tmp.clear();
+       }
        return tmp;
 }