Perfect hyphenation for your Website.

0.7.0 2024-05-15 08:27 UTC

This package is auto-updated.

Last update: 2024-07-15 08:51:19 UTC


PHP from Packagist Codacy Badge Latest Stable Version Total Downloads License

Kiwa Hyphenizer

Perfect hyphenation for your Website. This library integrates the Hyphenizer into your Kiwa website.

If you don't run your website with Kiwa, you can do this steps by your own.

Please note: The Hyphenizer API requires you to have a valid API token.


This library is made for the use with Composer. Add it to your project by running $ composer require kiwa/hyphenizer.


The static hyphenation works in three steps:

1. Extract all long words

To extract all long words from your website, run $ php bin/console hyphenation:list:create in your CLI.

The command will store the extracted words under /hyphenation/hyphenation-words.php.

2. Ask for their correct hyphenation

Ask the Hyphenizer API for the correct hyphenation. Run $ php bin/console hyphenation:list:hyphenate in your CLI.

The command will store the hyphenated words under /hyphenation/hyphenation-words.json.

3. Replace the original words with their hyphenated versions.

You can use the Hyphenation library written in JavaScript to replace all the extracted words. In this case, you need to import your hyphenation-words.json before initializing the class:

import Hyphenation from "kiwa-hyphenizer";
import hyphenatedWords from "hyphenation/hyphenation-words.json";

const hyphenation = new Hyphenation(hyphenatedWords);


If you have any questions, feel free to contact us under

Further information about Bit&Black can be found under