Textpattern CMS support forum
A Textpattern CMS plugin for typography lovers & exigent designers that automatic makes hyphenation in web page contents using soft hyphens.
The texts on the web suffer from aestetic differences (blank space’s widths) between each words when they are justified or too large differences in lenght of lines when they are left aligned. Maybe it’s the reason why the CSS “text-justify;” property isn’t used often. The only (poor) solution was to use the sign ­ (utf-8 encoding hyphen) which has a big problem: the text become often unreadable for the copy writers. This plugin makes automatic hyphenation in web text content using soft hyphens. Your web pages will be as beautiful as magazine printings.
Supports the peculiarities of different languages (actually 19).
Image: pat_hyphenate: Personal Dictionary page in order to use additional hyphens or overwrite internal rules.
Uncompress the file. Put the _hyphenator directory, and all its content, into your /textpattern directory. Be sure to give write access to the /textpattern/_hyphenator directory (CHMOD 775 or CHMOD 777).
<txp:pat_hyphenate content="" lang="" />
- content (required): choose which text content to hyphenate.
Only 2 available options: body or excerpt.
If unsets, displays a warning message. Default: body
- lang (optional): sets the content language in four letters form (i.e.
en-us). Default: Textpattern’s back-office language.
Useful for multilingual websites with eventually the help of a <txp:variable /> tag.
In that only case, replace the double quotes surrounding your variable into the lang attribute with simple quotes.
Notice: if your text content has some <code> or <pre> tags in it, the hyphenation doesn’t occur and the text is shown by the native
Using in remplacement of the native
<txp:body /> tag:
<txp:pat_hyphenate content="body" lang="en" />
which automaticaly add hyphens on all words for your body articles wrote in English accordingly with the lingual rules.
Due to the language complexity, for some words the hyphens are not displayed. You have a Personal dictionary (located under the “Content” tab) in order to add your personal rules. The words (one word by lines) you write here must have an hyphen (-) where you want to add an… hyphen ;). The “Personal Dictionary” is reactive: if you change your back-office language, a corresponding dictionary language is loaded. So, multilingual websites get benefits with this feature. All dictionary files are created if they don’t exist.
Plugin’s options (admins access only)
Visit the pat_hyphenate Options (under the “Extensions” tab) to install your Textpack plugin translation language file or to install upgrades.
Plugin’s Preferences (scheduled in next version. Note: current users will have free unlimited upgrades)
Access to Plugin’s Prefs in order to:
Set your PayPal Transaction ID your receive when you bought this plugin. Needed if you want to grab all the future plugin upgrades if available (unlimited time offer).
Set the character remplacement used for hyphens. Default and best choice: ­
Minimum characters on the left: characters to keep before an hyphen.
Minimum characters on the right: characters to keep after an hyphen.
Minimum characters: when to apply hyphens.
Maximum characters: when to stop hyphens.
- 4th December 2013: v 0.2.8 validates lang & codes to exclude atributes.
- 3rd December 2013: v 0.2.7 validates (some) integer attributes.
- 1st December 2013: v 0.2.6 final.
- 26th November 2013: v 0.2.5. Multilingual support.
- 31st August 2013: v 0.2.4. Add plugin’s prefs support.
- 14th May 2013: v 0.2.3. public version.
- 12th May 2013: v 0.2.2.a Add creation on the fly feature for the dictionary-$lang.txt file.
- 9th May 2013: v 0.2.2. Add a Textpack support. Add an upgrade feature for the plugin.
- 8th may 2013: v 0.2.1. Add tests on <code> & <pre> tags. Thanks for notice CEBE.
- 7th may 2013: v 0.2. Personal dictionary box added in the TXP back-office.
- 5th may 2013: v 0.1 first commit with only front usage.
Thanks to Core Dev Team who makes Textpattern CMS so awesome.
Thanks to the creators of the Hyphenator library.
Many thanks to (one of my prefered TXP plugin programer) CEBE for her good advices.
Last edited by Pat64 (2013-12-04 16:16:45)
Patrick, thank you! That’s what I was looking for a long time…
Don’t work with russian language.
I continue to hyphenate manually…
Last edited by Kri.o (2013-06-24 11:43:38)
Could you send me your text in Russian, please (pretty difficult for me to write with this language ;) ?
Just a question: did you install the russian language for Textpattern CMS back-office?
lang attribute need four letters (due to TXP back-office language option). So try this:
<txp:pat_hyphenate content="body" lang="ru-ru" />
Tips: if all works fine after that, remove all your manual hyphen signs in your texts: you never need it.
Last edited by Pat64 (2013-06-24 13:43:02)
lang="ru-ru" doesn’t work, I have tried this.
I have already installed russian back-office language, as well as english. No change…
Долгожданное обновление портфолио компании. Уютная кухня в розовых тонах и витрина оригинальной формы.
Компания открывает производство элитной мебели в Туле: кухонные гарнитуры из натурального дерева!
Восточные мотивы на сайте “Вашего Мебельера”: cтенка для гостиной и шкаф-купе в наборе мебели “Махаон”.
Новые шкафы для небольшой спальни и стандартной прихожей: “Нега” и “Отражение”.
Обновление раздела “Портфолио”: торговое оборудование для наших партнёров, компании “Биосфера”.
Новые фотографии в рубрике “Торговая мебель”, комплект мебели для офиса: стойка “Консул”, витрина “Базилевс”, шкафы “Кардинал”.
Last edited by Kri.o (2013-06-25 05:08:18)
Is there any progress?