Perfect hyphenation for your Website.
Fund package maintenance!
- php: >=7.4
- ext-dom: *
- ext-json: *
- bitandblack/helpers: ^1.0
- guzzlehttp/guzzle: ^7.0
- psr/log: ^1.0 || ^2.0 || ^3.0
- symfony/console: ^5.0 || ^6.0
- kiwa/core: ^0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.0
- rector/rector: ^0
- symplify/easy-coding-standard: ^11.0
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
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
3. Replace the original words with their hyphenated versions.
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 www.bitandblack.com.