PHPackages                             heimrichhannot/contao-hyphenator-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. heimrichhannot/contao-hyphenator-bundle

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

heimrichhannot/contao-hyphenator-bundle
=======================================

Word-Hyphenation for the contao content-management-system.

1.12.0(10mo ago)11.7k1[2 issues](https://github.com/heimrichhannot/contao-hyphenator-bundle/issues)LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0CI failing

Since Jun 12Pushed 10mo ago5 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-hyphenator-bundle)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-hyphenator-bundle)[ Docs](https://github.com/heimrichhannot/contao-hyphenator-bundle)[ RSS](/packages/heimrichhannot-contao-hyphenator-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (8)Versions (43)Used By (0)

Contao Hyphenator Bundle
========================

[](#contao-hyphenator-bundle)

[![](https://camo.githubusercontent.com/baa9045d83a08353ea6dc0fa12ce8bf3de653f0235bfdec7e38be9a5fe871675/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d68797068656e61746f722d62756e646c652e737667)](https://camo.githubusercontent.com/baa9045d83a08353ea6dc0fa12ce8bf3de653f0235bfdec7e38be9a5fe871675/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d68797068656e61746f722d62756e646c652e737667)[![](https://camo.githubusercontent.com/50d46ee4318294cb39ef496459060a685174fae81ba103730805f2f04abb95ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d68797068656e61746f722d62756e646c652e737667)](https://camo.githubusercontent.com/50d46ee4318294cb39ef496459060a685174fae81ba103730805f2f04abb95ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d68797068656e61746f722d62756e646c652e737667)[![](https://camo.githubusercontent.com/a947dcf33eef4057ebd4781da4fd2960b0d53154e7c123dcdb927acf7c90fd51/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6865696d7269636868616e6e6f742f636f6e74616f2d68797068656e61746f722d62756e646c652f6d61737465722e737667)](https://travis-ci.org/heimrichhannot/contao-hyphenator-bundle/)[![](https://camo.githubusercontent.com/54f79329c8eea1387232771cbfc805d7b5895f0c8f4d9e751e840a88e0a34c40/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6865696d7269636868616e6e6f742f636f6e74616f2d68797068656e61746f722d62756e646c652f6d61737465722e737667)](https://coveralls.io/github/heimrichhannot/contao-hyphenator-bundle)

A contao bundle that grants server-side hyphenation (thanks to [vanderlee/phpSyllable](https://github.com/vanderlee/phpSyllable)). It does support headlines and paragraphs by default.

This module also handles line break exceptions, in order to keep words like company names together and prevent line break (see `tl_page` backend entity).

Options
-------

[](#options)

To extend the functionality, all options can be adjusted within your localconfig.

OptionTypeDefaultDescriptionhyphenator\_tagsstring'h1:not(:empty):not(.hyphen-none), h2:not(:empty):not(.hyphen-none), h3:not(:empty):not(.hyphen-none), h4:not(:empty):not(.hyphen-none), h5:not(:empty):not(.hyphen-none), h6:not(:empty):not(.hyphen-none), p:not(:empty):not(.hyphen-none), a:not(:empty):not(.hyphen-none), dt:not(:empty):not(.hyphen-none), dd:not(:empty):not(.hyphen-none)'What type of selectors the hyphenator should look at.hyphenator\_wordMinint10Words under the given length will not be hyphenated altogether.hyphenator\_hyphenedLeftMinint6After hyphenation the resulting left part must have at least this many characters.hyphenator\_hyphenedRightMinint6After hyphenation the resulting right part must have at least this many characters.hyphenator\_hyphenstring­This character shall be used as Hyphen-Character.hyphenator\_skipPagesarrayemptyArray of Contao Page Ids, the Hyphenator should skip from hyphenation.hyphenator\_enableCachebooltrueEnable simple caching and do not hyphenate equal elements twice.hyphenator\_locale\_language\_mappingarray\['en' =&gt; 'en-us', 'cz' =&gt; 'cs'\]Map locale to hyphenator tex separation pattern dictionarySkip hyphenation
----------------

[](#skip-hyphenation)

If you want to skip several tags from hyphenation simply add `hyphen-none` as css-class to the appropriate element or use the `tl_page.hyphenation` field.

You also can add tags to be skipped to your project configuration. See configuration reference below

Configuration reference
-----------------------

[](#configuration-reference)

```
# Default configuration for extension with alias: "huh_hyphenator"
huh_hyphenator:

  # Add tags you want to be skipped from hyphenating, to array (string without )
  skip_tags: []
```

Line break exceptions
---------------------

[](#line-break-exceptions)

Hyphenator comes with line break exception handling. Simply add `lineBreakExceptions` on `tl_page` and prevent line break for connected word groups like:

- Company Names (search: `Heimrich & Hannot(?:\sGmbH)|Heimrich & Hannot(?:s)?`, will be replaced to: `Heimrich&nbsp;&amp;&nbsp;Hannot&nbsp;GmbH`)
- Prices and other units (search: `(\d|€)(\s)(\w)`, replace: `$1[nbsp]$3`, Example: `160.000 m²` -&gt; `160.000&nbsp;m²`, `167 Mio. €` -&gt; `167&nbsp;Mio.&nbsp;€`)

As you can see, if you provide an replace pattern, than an regular expression will handle the replacement, otherwise if only an search pattern is provided, spaces will be protected with `&nbsp;`.

Requirements
------------

[](#requirements)

- [vanderlee/phpSyllable](https://github.com/vanderlee/phpSyllable)
- [wa72/htmlpagedom](https://github.com/wasinger/htmlpagedom)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 52.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Recently: every ~302 days

Total

41

Last Release

310d ago

PHP version history (3 changes)1.0.0PHP ^7.1

1.11.3PHP ^7.1 || ^8.0

1.12.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ad3224d8727b622ebd229840eea6b9dbcb83eb0bd609e6ce65b614830ff538?d=identicon)[digitales@heimrich-hannot.de](/maintainers/digitales@heimrich-hannot.de)

---

Top Contributors

[![koertho](https://avatars.githubusercontent.com/u/12064642?v=4)](https://github.com/koertho "koertho (10 commits)")[![ericges](https://avatars.githubusercontent.com/u/25957923?v=4)](https://github.com/ericges "ericges (7 commits)")[![AlexejKossmann](https://avatars.githubusercontent.com/u/32612134?v=4)](https://github.com/AlexejKossmann "AlexejKossmann (1 commits)")[![cgoIT](https://avatars.githubusercontent.com/u/8972203?v=4)](https://github.com/cgoIT "cgoIT (1 commits)")

---

Tags

contaohyphenhyphenator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/heimrichhannot-contao-hyphenator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/heimrichhannot-contao-hyphenator-bundle/health.svg)](https://phpackages.com/packages/heimrichhannot-contao-hyphenator-bundle)
```

###  Alternatives

[heimrichhannot/contao-encore-bundle

This bundle brings deep integration for symfony encore into contao. On the one hand, your can prepare your bundles to define own webpack entries, which added with just one command to your webpack entries. On the other hand, this bundle allows you to add encore entries only on the pages you need them for optimizing your website performance.

1016.6k](/packages/heimrichhannot-contao-encore-bundle)[metamodels/core

MetaModels core

10156.4k67](/packages/metamodels-core)[codefog/contao-haste

haste extension for Contao Open Source CMS

46676.5k171](/packages/codefog-contao-haste)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3189.0k6](/packages/codefog-contao-news-categories)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3177.0k6](/packages/terminal42-contao-node)[terminal42/contao-folderpage

Provides a new page type for Contao that allows you to group pages into folders.

18156.0k10](/packages/terminal42-contao-folderpage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
