Hyphenator.js …
- automatically hyphenates texts on websites if either the webdeveloper has included the script on the website or you use it as a bookmarklet on any site.
- runs on any modern browser that supports JavaScript and the soft hyphen (­).
- automatically breaks URLs on any browser that supports the zero width space.
- runs on the client in order that the HTML source of the website may be served clean and svelte and that it can respond to text resizings by the user.
- follows the ideas of unobtrusive JavaScript.
- has a documented API and is highly configurable to meet your needs.
- supports a wide range of languages.
- relies on Frank M. Liangs hyphenation algorithm (PDF) commonly known from LaTeX and OpenOffice.
- is free software licensed under LGPL v3.
- provides a service for customizing, merging and packing script and patterns.
Hyphenator.js does …
- not give you control over how many hyphens you'll have as endings on consecutive lines.
- not eliminate misleading hyphenation like 'leg-ends' (depending on the pattern quality).
- not work in Firefox 2 (but it works fine in Firefox >=3.0)
- not handle special (aka non-standard) hyphenation (e.g. omaatje->oma-tje)
See a simple life example (resize window or click the button in the upper right corner).
Where to go from here
See the articles in the wiki for more information about:
- How to use Hyphenator
- Documentation of the public API
- Correcting hyphenation
- Optimizations
- Add support for further language
- Version History
- Bug reporting and feature requests
There's also a FAQ
If you're looking for a server-side script doing hyphenation I recommend http://yellowgreen.de/hyphenation-in-web/
News
May 06, 2009
Version 2.2.0 This minor release brings a the following changes:
- Support for portuguese
- Functions like hyphenateDocument(), hyphenateElement() and hyphenateWord() are made private. Instead there's a new public function hyphenate().
- Fixed issue55 , issue56 , issue60
- Internal code beautifying (check with jslint)
- new service `merge+pack.html` bundled with the package: easily create a customized and packed all-in-one script file of Hyphenator.js
Apr 05, 2009
Version 2.1.0 This minor release brings a the following changes:
- It's licensed under LGPL version 3.0
- The DOM isn't cluttered anymore with lang and style attributes after Hyphenator.js is run
- fixed issue 53 : language is recognized even if it's uppercase
Donate
Hyphenator.js is absolutely free of charge. But if you think Hyphenator.js is cool you can
or make a gift: Amazon wishlist.
Sites and projects related to Hyphenator
Other projects
- Plugin for Wordpress: http://wordpress.org/extend/plugins/hyphenator/
- http://userscripts.org/scripts/show/9022 uses Hyphenator
- http://groups.google.de/group/trennmuster-opensource is creating new patterns for german
Showcase (Sites using Hyphenator)
- http://www.uni-hamburg.de/newsletter.html
- http://tr.ashcan.org/
- http://www.bmj.bund.de/
- http://www.billhillsite.com/
- http://www.andreherdling.de/
- http://haki-sh.de/
- http://www.gundl.at/
- http://www.arthrogryposis.de/
- http://www.biggles.ch/
- http://yoursmartdesign.de/
- http://hoffmannliebenberg.de/
- http://doriantaylor.com/
- http://blog.int64.org/
- http://nikolasbecker.de/
- http://spellbreaker.org/~chrender/Sherlock_Holmes/
- http://www.bfmtm.de/
- http://www.endo-revitalzentrum.de/
- http://www.ambralaw.ch/
- http://www.krenz-kanzlei.rsclan.de/