From fbe00146da89af48f2c157b5ccb65d78821d7821 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sun, 28 Jan 2018 16:23:08 +0100
Subject: [PATCH 10/12] handle text language

---
 Scribus/scribus/plugins/import/revenge/rawpainter.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Scribus/scribus/plugins/import/revenge/rawpainter.cpp b/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
index 3fa4a8cf5..46249df9d 100644
--- a/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
+++ b/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
@@ -1697,6 +1697,16 @@ void RawPainter::openSpan(const librevenge::RVNGPropertyList &propList)
 	if (propList["fo:hyphenate"])
 		styleEffects |= ScStyle_HyphenationPossible;
 	// TODO: handle drop caps
+	if (propList["fo:language"])
+	{
+		QStringList locale;
+		locale.append(propList["fo:language"]->getStr().cstr());
+		if (propList["fo:script"])
+			locale.append(propList["fo:script"]->getStr().cstr());
+		if (propList["fo:country"])
+			locale.append(propList["fo:country"]->getStr().cstr());
+		textCharStyle.setLanguage(locale.join('_'));
+	}
 	textCharStyle.setFeatures(styleEffects.featureList());
 }
 
-- 
2.14.3

