// get language options with modifiers
bool have_mods = false;
vector<string> blangs;
- for (auto const & l : features.getLanguages()) {
- if (l->babel().empty())
- continue;
+ std::set<Language const *> langs = features.getLanguages();
+ // add main language
+ langs.insert(language);
+ for (auto const & l : langs) {
string blang = l->babel();
+ if (blang.empty())
+ continue;
if (l->babelOptFormat() == "modifier") {
vector<string> opts = getVectorFromString(babelLangOptions(l->lang()));
bool have_one = false;
{
odocstringstream tmp;
- for (auto const & lang : UsedLanguages_) {
+ std::set<Language const *> langs = UsedLanguages_;
+ // add main language
+ langs.insert(bufferParams().language);
+ for (auto const & lang : langs) {
if (!lang->babel_postsettings().empty())
tmp << lang->babel_postsettings() << '\n';
if (lang->babelOptFormat() != "modifier") {
// set appropriate quotation mark style
updateQuoteStyles(true);
+
+ updateLanguageOptions();
}
bool const use_polyglossia = extern_polyglossia
|| (langpack != "babel" && !extern_babel
&& fontModule->osFontsCB->isChecked());
- for (auto const & l : buffer().getLanguages()) {
+ std::set<Language const *> langs = buffer().getLanguages();
+ // We might have a non-yet applied document language
+ QString const langname = langModule->languageCO->itemData(
+ langModule->languageCO->currentIndex()).toString();
+ Language const * newlang = lyx::languages.getLanguage(fromqstr(langname));
+ langs.insert(newlang);
+ for (auto const & l : langs) {
QTreeWidgetItem * twi = new QTreeWidgetItem();
twi->setData(0, Qt::DisplayRole, qt_(l->display()));
twi->setData(0, Qt::UserRole, toqstr(l->lang()));