From 2f81aef0a3608835fd6e67585362f627f3135681 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 5 Jun 2022 22:42:25 +0200 Subject: [PATCH] Set build language for Open Document files --- novelwriter/tools/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/novelwriter/tools/build.py b/novelwriter/tools/build.py index 66f203bd..b27a98a4 100644 --- a/novelwriter/tools/build.py +++ b/novelwriter/tools/build.py @@ -659,6 +659,7 @@ class GuiBuildNovel(QDialog): fmtUnnumbered = self.fmtUnnumbered.text() fmtScene = self.fmtScene.text() fmtSection = self.fmtSection.text() + buildLang = self.buildLang.currentData() hideScene = self.hideScene.isChecked() hideSection = self.hideSection.isChecked() textFont = self.textFont.text() @@ -676,7 +677,7 @@ class GuiBuildNovel(QDialog): replaceUCode = self.replaceUCode.isChecked() # The language lookup dict is reloaded if needed - self.theProject.setProjectLang(self.buildLang.currentData()) + self.theProject.setProjectLang(buildLang) # Get font information fontInfo = QFontInfo(QFont(textFont, textSize)) @@ -706,6 +707,7 @@ class GuiBuildNovel(QDialog): if isOdt: bldObj.setColourHeaders(not noStyling) + bldObj.setLanguage(buildLang) bldObj.initDocument() # Make sure the project and document is up to date