Skip to content

Commit

Permalink
1.2.6, check changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico Kaltofen committed Dec 4, 2018
1 parent a2e171a commit 4b83d98
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.2.6] - 2018-12-04

### Fixed
- page language and naming of .tex files do not match, provide `$GLOBALS['TL_CONFIG']['hyphenator_locale_language_mapping']` in order to handle with

## [1.2.5] - 2018-10-22

### Fixed
Expand Down
8 changes: 7 additions & 1 deletion src/Hyphenator/FrontendHyphenator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public function hyphenate($strBuffer)

\Syllable::setCacheDir(System::getContainer()->getParameter('kernel.cache_dir'));

$h = new \Syllable($objPage->language);
$language = $objPage->language;

if (isset($GLOBALS['TL_CONFIG']['hyphenator_locale_language_mapping'][$language])) {
$language = $GLOBALS['TL_CONFIG']['hyphenator_locale_language_mapping'][$language];
}

$h = new \Syllable($language);
$h->setMinWordLength(Config::get('hyphenator_wordMin'));
$h->setHyphen(Config::get('hyphenator_hyphen'));

Expand Down
1 change: 1 addition & 0 deletions src/Resources/contao/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
$GLOBALS['TL_CONFIG']['hyphenator_hyphen'] = '­';
$GLOBALS['TL_CONFIG']['hyphenator_skipPages'] = [];
$GLOBALS['TL_CONFIG']['hyphenator_enableCache'] = true;
$GLOBALS['TL_CONFIG']['hyphenator_locale_language_mapping']['en'] = 'en-us'; // map page language to .tex files

/**
* Hooks
Expand Down

0 comments on commit 4b83d98

Please sign in to comment.