From 8a22754de3ff307851a96b3bb668cad27b9f6ff6 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 29 Jan 2018 08:46:37 +0100 Subject: [PATCH] better lng handling --- typography.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/typography.php b/typography.php index 7844722..05ef4d0 100644 --- a/typography.php +++ b/typography.php @@ -58,7 +58,9 @@ function typography_render ( &$a, &$o) { $l = new Text_LanguageDetect; $lng = $l->detectSimple($o['html']); $lng = str_replace( $lng_long, $lng_id, $lng); - $typo->settings["diacriticLanguage"] = $lng; + $typo->set_smart_quotes_language($lng); + $typo->set_diacritic_language($lng); + $typo->set_hyphenation_language($lng); $o['html'] = $typo->process($o['html']); $a->page['htmlhead'] .= ''; unset($l);