The wp-Hyphenate plugin has merged with the wp-Typogrify plugin to form wp-Typography. Try it out, and give us your feedback. The below content is left for legacy, but this plugin is now officially discontinued.
Hyphenation is finally available for the web. The addition of hyphenation is a significant step forward for the state of web typography. With it your left aligned text will be less ragged, and your justified text will avoid the ghastly word spacing that has prevented serious web designers from using it.
wp-Hyphenate includes tremendous ability to customize its application of hyphenation and adds features aid browsers to properly wrap long urls and keep widows company (a widow is the last word of a block of text that stands alone on the last line).
- Why hyphenate?
- Hyphenation increases the visual appeal of your website. When justifying text without hyphenation, word spacing is distractingly large. With left-aligned text, the right edge will be unnecessarily ragged.
- How does hyphenation work?
The soft-hyphen is an invisible character that communicates to web browsers allowable line breaks within words. When a web browser wraps a line at a soft-hyphen, a hyphen is shown at line’s end.
Similar to the soft-hyphen, the zero-space character communicates allowable line breaks within strings of text. But unlike the soft-hyphen, it does not show a hyphen at line’s end. This is ideal for forcing consistent wrapping of long URLs. It also can be used to force line breaks in uncooperative web browsers after hard-hyphens in words like “zero-space” and “soft-hyphen”.
- Which browsers support hyphenation?
Not all browsers support online hyphenation. Notably, before version 3, Firefox did not support hyphenation. Fortunately, it failed gracefully — hyphenated text displayed as if it was unhyphenated.
Starting with Internet Explorer 6, Firefox 3, Safari 2, and Opera 8, all major web browsers have offered full support for online hyphenation.
- Does hyphenation effect search?
- It depends on the search engine. Google and Yahoo properly handle the soft-hyphen character without penalty. Microsoft and Ask improperly treat soft-hyphens as word breaks. Fortunately, Google and Yahoo comprise more than 90% of the search market.
- Can I control how a specific word is hyphenated?
- Yes. The administrative panel for wp-Hyphenate includes an editable exceptions list.
- What are widows and why protect them?
A widow is the final word in a block of text that falls to its own line. Especially if the widow is only a few characters long, she can get lonely. wp-Hyphenate will try to protect widows by bringing them company from the previous line.
There is danger that the widow’s company will leave the previous line with less than optimal word spacing. The risk is less if your text is left-aligned, but if it is justified, tread carefully. The protection of widows is completely customizable in the administrative options.
- Is there any other implementation of this HTML hyphenation technology?
- Yes. KINGdesk has also implemented this same technology as a simple web app at http://hyph-n.com. Submit your static HTML in the provided web form, and it will return hyphenated results for your use.
- Does wp-Hyphenate work with the Typogrify plugin?
- Yes. However, they will both try to prevent widows. Widow handling should be turned off in the Typogrify administrative options. The wp-Hyphenate handling of widows allows for more granular control, allowing the user to balance widow handling with the additional word-spacing created on the previous line.
- What hyphenation algorithm is used in wp-Hyphenate?
- The hyphenation algorithm used by wp-Hyphenate is based on the 1983 Stanford Ph.D. thesis of professor Frank Liang: Word Hy-phen-a-tion by Com-puter. Liang’s PatGen algorithm was updated in 1991 by Peter Breitenlohner. The resulting algorithm finds 90% of all allowed hyphenation points identified in the Webster’s Unabridged Dictionary with a 0% error rate.
- What language patterns are included with this library?
- wp-Hyphenate now has multi-language support. Pattern libraries are included for Basque, Bulgarian, Catalan, Chinese, Pinyin (Latin), Croatian, Czech, Danish, English (United Kingdom), English (United States), Estonian, Finnish, French, Galician, German, Greek (Ancient), Greek, Modern Monotonic, Greek, Modern Polytonic, Icelandic, Indonesian, Interlingua, Irish, Italian, Latin, Lithuanian, Mongolian (Cyrillic), Polish, Portuguese, Romanian, Russian, Sanskrit, Serbian (Cyrillic), Serbocroatian (Cyrillic), Serbocroatian (Latin), Slovak, Slovenian, Spanish, Swedish, Turkish, Ukrainian, and Welsh.
- Can I port this plugin to another CMS?
- Yes. wp-Hyphenate is licensed under the GNU General Public License 2.0. If modify it, you must retain the KINGdesk, LLC copyright information, the request for a link to http://kingdesk.com, and the web design services contact information unchanged. If you redistribute this software, or any derivative, it must be released under the GNU General Public License 2.0.
- Will this plugin slow my page loading times?
- Yes. There is a fair amount of processing that takes place every time a post is called from your MySQL database. In our internal tests, we have seen one-half a second added to single post pages, and over 1 second added to multi-post pages. While page load times will likely remain acceptable to your users, it is still recommended that you use a caching plugin (like WP-Cache or WP Super Cache) with wp-Hyphenate. There is no delay in the serving of cached pages.
- Can I make a donation to support this plugin?
- No. We don’t want your money. If you want to show your support, we would greatly appreciate a link to kingdesk.com from your website — perhaps in a nice review of this plugin.
- This site is damn sexy. Can I hire KINGdesk to design a website for my company?
- Yes. Please contact us.
- Version 1.07 beta, November 25, 2008
- Worked around last multibyte string function from English hyphenation to address obscure encoding error
- Version 1.06 beta, November 25, 2008
- Provided for single byte alphabets to not use multibyte string functions to increase performance
- Now runs 43% faster for English hyphenation
- Internationalized text in admin options
- Properly removes multiple links that may have been improperly included by the URL linking functionality
- Simplified dehyphen.js to only remove zero-width spaces from IE6
- Version 1.05 beta, November 10, 2008
- Inserted actual soft-hyphen and zero-width space characters, rather than their HTML representations. This cleans up the appearance of the source code.
- Removed errant auto-linking of URLs in the HTML title attribute
- Excluded hyphenation, URL wrapping and widow protection from feeds
- Forced wrapping after underscore characters in the midst of words
- Corrected hyphenation of words containing select non-Latin characters
- Version 1.04 beta, November 16, 2008
- Shortened the default string length for the hyph_chunkSubject function from 4000 characters to 3000. This cured an issue where some text was being dropped (depending on server configuration).
- Unlinked urls now link automatically when the “Always Link URLs” option is selected in the Admin options.
- Version 1.03 beta, November 9, 2008
- General code clean-up to separate core functionality for easy porting to php based content management systems
- Added simple validation for user defined list of tags whose content should not be hyphenated
- Updated all calculations to properly handle multibyte characters as required for multi-language
- Added multi-language support and hyphenation patterns for the following languages: Basque, Bulgarian, Catalan, Chinese, Pinyin (Latin), Croatian, Czech, Danish, English (United Kingdom), English (United States), Estonian, Finnish, French, Galician, German, Greek (Ancient), Greek, Modern Monotonic, Greek, Modern Polytonic, Icelandic, Indonesian, Interlingua, Irish, Italian, Latin, Lithuanian, Mongolian (Cyrillic), Polish, Portuguese, Romanian, Russian, Sanskrit, Serbian (Cyrillic), Serbocroatian (Cyrillic), Serbocroatian (Latin), Slovak, Slovenian, Spanish, Swedish, Turkish, Ukrainian, and Welsh.
- Multi-language support now requires the server run PHP 5. This plugin is not PHP 4 compatable.
- Version 1.02 beta, November 5, 2008
- Resolved problem where occasional character was dropped in long posts.
- Version 1.01 beta, November 4, 2008
- Removed all new PHP 5 functions and replaced with code that is compatible with PHP version 4.3 and later .
- Version 1.0 beta, November 1, 2008
- Original Release
Your feedback is much appreciated. How can we make this plugin better?