PHPackages                             carbon/hyphen - 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. carbon/hyphen

ActiveNeos-carbon[Utility &amp; Helpers](/categories/utility)

carbon/hyphen
=============

Make hyphens easier in Neos CMS

3.2.0(2y ago)220.8k↓33.3%4[1 issues](https://github.com/CarbonPackages/Carbon.Hyphen/issues)[1 PRs](https://github.com/CarbonPackages/Carbon.Hyphen/pulls)GPL-3.0PHPCI passing

Since May 11Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/CarbonPackages/Carbon.Hyphen)[ Packagist](https://packagist.org/packages/carbon/hyphen)[ Fund](https://www.paypal.me/Jonnitto/20eur)[ GitHub Sponsors](https://github.com/jonnitto)[ RSS](/packages/carbon-hyphen/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (18)Used By (0)

[![Latest stable version](https://camo.githubusercontent.com/6195afc0a232364f23b615959c595005d9d7672fc22f8f8c1defd6ec3c99f541/68747470733a2f2f706f7365722e707567782e6f72672f636172626f6e2f68797068656e2f762f737461626c65)](https://packagist.org/packages/carbon/hyphen) [![Total downloads](https://camo.githubusercontent.com/4c73920c4d9d621d3d3eb250ce19f9cf9821c99726cc639fad439e8a17621d20/68747470733a2f2f706f7365722e707567782e6f72672f636172626f6e2f68797068656e2f646f776e6c6f616473)](https://packagist.org/packages/carbon/hyphen) [![License](https://camo.githubusercontent.com/c207a1c181c535f2ed65e8fd5575a94090a0b7cb00197a7e6eb19eaab6ac2eb7/68747470733a2f2f706f7365722e707567782e6f72672f636172626f6e2f68797068656e2f6c6963656e7365)](https://packagist.org/packages/carbon/hyphen) [![GitHub forks](https://camo.githubusercontent.com/dbc71d2768a6a940a0e53b249b4fa5f6a34fe108a585999c269e4dc31fe13b52/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f436172626f6e5061636b616765732f436172626f6e2e48797068656e2e7376673f7374796c653d736f6369616c266c6162656c3d466f726b)](https://github.com/CarbonPackages/Carbon.Hyphen/fork) [![GitHub stars](https://camo.githubusercontent.com/819d522a8e27f3956f56d58210e3825f3ba22a9ee7df184336b33dd195e0a880/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f436172626f6e5061636b616765732f436172626f6e2e48797068656e2e7376673f7374796c653d736f6369616c266c6162656c3d5374617273)](https://github.com/CarbonPackages/Carbon.Hyphen/stargazers) [![GitHub watchers](https://camo.githubusercontent.com/8261390779b6de484af11540349d51e26a2c99c37061d7d20bc698328179e29e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f436172626f6e5061636b616765732f436172626f6e2e48797068656e2e7376673f7374796c653d736f6369616c266c6162656c3d5761746368)](https://github.com/CarbonPackages/Carbon.Hyphen/subscription)

Carbon.Hyphen Package for Neos CMS
==================================

[](#carbonhyphen-package-for-neos-cms)

Make hyphens easier
-------------------

[](#make-hyphens-easier)

Optional word-breaks are hard to enter in Neos CMS. This package provides a Fusion wrapper for [phpSyllable](https://github.com/vanderlee/phpSyllable)

Installation
------------

[](#installation)

```
composer require carbon/hyphen
```

Usage
-----

[](#usage)

### Text

[](#text)

Just use the `Carbon.Hyphen:Text` Fusion object as a processor or wrapper on the Fusion value that should be hyphenated.

```
superlongValue = 'supercalifragilisticexpialidocious'
superlongValue.@process.hyphenate = Carbon.Hyphen:Text {
  locale = 'en-gb'
}
```

### HTML

[](#html)

Similar to text elements you can use `Carbon.Hyphen:Html` for HTML elements.

```
someFusionHtml.@process.hyphenate = Carbon.Hyphen:Html
```

Neos CMS integration example
----------------------------

[](#neos-cms-integration-example)

You can easily activate hyphenation for all Neos CMS text- and headline nodetypes with following Fusion code:

```
prototype(Foo.Bar:Content.Text) {
  renderer.@process.hyphenate = Carbon.Hyphen:Html
}

prototype(Foo.Bar:Content.Headline) {
  title.@process.hyphenate = Carbon.Hyphen:Text
}
```

or directly on a specific parameter:

```
prototype(Foo.Bar:Component) {
    headline = Neos.Neos:Editable {
        property = 'headline'
        block = false
    }

    renderer = afx`

            {props.headline}

    `
}
```

Parameters
----------

[](#parameters)

**locale** (string) : Reference to the language in which the given string will be hyphenated
(Have a look at [syllable languages](https://github.com/vanderlee/phpSyllable/tree/master/languages) for a reference of available languages)

**threshold** (integer, default = `0`) : Minimum amount characters a word needs to have, before it is being hyphenated.

Custom language mappings
------------------------

[](#custom-language-mappings)

Probably you've got a language defined that is not available in syllable. For example, `en` is not available, but `en-gb` is. Because of that, you can map your language preset to another syllable language: Per default following settings are set in [Settings.Carbon.yaml](Configuration/Settings.Carbon.yaml):

```
Carbon:
  Hyphen:
    # Throw exception if no hyphen definition is found
    throwException: true
    mapping:
      en: en-gb
      de-de: de
      de-at: de
```

Credits
-------

[](#credits)

This implementation was heavily inspired by [packagefactory/hyphenate](https://github.com/PackageFactory/hyphenate).

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance40

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 86.8% 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 ~123 days

Recently: every ~185 days

Total

16

Last Release

1085d ago

Major Versions

v1.x-dev → 2.0.02021-01-01

2.1.0 → 3.0.02021-03-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fec51ac160a110a31a72a54ac29e276a447d8306205a052d35491ac9cf0589b?d=identicon)[jonnitto](/maintainers/jonnitto)

---

Top Contributors

[![jonnitto](https://avatars.githubusercontent.com/u/4510166?v=4)](https://github.com/jonnitto "jonnitto (33 commits)")[![dlubitz](https://avatars.githubusercontent.com/u/13046100?v=4)](https://github.com/dlubitz "dlubitz (2 commits)")[![alexander-nitsche](https://avatars.githubusercontent.com/u/20297232?v=4)](https://github.com/alexander-nitsche "alexander-nitsche (1 commits)")[![rolandschuetz](https://avatars.githubusercontent.com/u/735982?v=4)](https://github.com/rolandschuetz "rolandschuetz (1 commits)")[![skurfuerst](https://avatars.githubusercontent.com/u/190777?v=4)](https://github.com/skurfuerst "skurfuerst (1 commits)")

---

Tags

carbonhyphenneoscmspackagehelpercarbonflowNeosFUSION

### Embed Badge

![Health badge](/badges/carbon-hyphen/health.svg)

```
[![Health](https://phpackages.com/badges/carbon-hyphen/health.svg)](https://phpackages.com/packages/carbon-hyphen)
```

###  Alternatives

[carbon/includeassets

Include your assets (css, js) in an easy way into Neos

14228.6k10](/packages/carbon-includeassets)

PHPackages © 2026

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