Download the PHP package liip/hyphenator-bundle without Composer
On this page you can find all versions of the php package liip/hyphenator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download liip/hyphenator-bundle
More information about liip/hyphenator-bundle
Files in liip/hyphenator-bundle
Package hyphenator-bundle
Short Description This Bundle provides support for hyphenating long words using the Org_Heigl_Hyphenator library
License MIT
Homepage http://liip.ch
Informations about the package hyphenator-bundle
Introduction
Adds support for hyphenating long words using the Org_Heigl_Hyphenator library.
This bundle will add a Twig Extension for templates and a Hyphenator service.
Installation
-
Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
-
Enable the Bundle
Add the following line in the
app/AppKernel.php
file to enable this bundle only for thetest
environment: -
Configure the bundle:
The supported options for the Hyphenator with the defaults are:
All settings are optional. Caution:
default_locale
needs to be a fully qualified locale likeen_EN
,en
will not work.For details about their meaning consult the Hyphenator library documentation.
Usage
This library adds a filter for twig templates that can be used like:
{{ "Somelongwordtohyphenate"|hyphenate }}
Alternatively the filter can be applied to an entire block:
{% filter hyphenate %}
...
Somelongwordtohyphenate
....
{% endfilter %}
Furthermore its possible to pass in a locale as a parameter if the default locale should not be used:
{{ "Somelongwordtohyphenate"|hyphenate("de") }}
All versions of hyphenator-bundle with dependencies
org_heigl/hyphenator Version ~2.0
twig/twig Version ~1.20|~2.0
symfony/framework-bundle Version ~2.3|~3.0