better lng handling

This commit is contained in:
Tobias Diekershoff 2018-01-29 08:46:37 +01:00
parent cc32f07105
commit 8a22754de3
1 changed files with 3 additions and 1 deletions

View File

@ -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'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/typography/style.css' . '" media="all" />';
unset($l);