Browse Source

better lng handling

master
Tobias Diekershoff 3 years ago
parent
commit
8a22754de3
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      typography.php

+ 3
- 1
typography.php 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);


Loading…
Cancel
Save