The attached patch fixes bug 3568:
http://bugzilla.lyx.org/show_bug.cgi?id=3568

Babel shouldn't be called when the given language in lib/languages is empty. This part was missing in the patch for bug 3043.

OK to go in?

regards Uwe
Index: BufferParams.cpp
===================================================================
--- BufferParams.cpp	(revision 18224)
+++ BufferParams.cpp	(working copy)
@@ -1391,6 +1391,11 @@
 	string tmp = lyxrc.language_package;
 	if (!lyxrc.language_global_options && tmp == "\\usepackage{babel}")
 		tmp = string("\\usepackage[") + lang_opts + "]{babel}";
+	// 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("");
 	return tmp;
 }
 

Reply via email to