---
title: "Hyphenate ViewHelper <lih:hyphenate>"
manual: "LiaHyphenator"
version: "main"
permalink: "https://docs.typo3.org/permalink/lia/lia_hyphenator:lia-liahyphenator-hyphenate@main"
source: "ViewHelper/LiaHyphenator/Hyphenate.rst"
modified: "2026-09-15T15:53:44+00:00"
---

# Hyphenate ViewHelper `<lih:hyphenate>`

This ViewHelper can be used to apply hyphenation to text.

## Examples

### Usage with simple StringContent

The ViewHelper can be used as tag as well as with inline syntax, here are some Examples
used with a Variable set like this:

```html
<f:variable name="stringContent">Some textcontent to apply hyphention to</f:variable>
```

ViewHelper usage:

```fluid
{stringContent -> lih:hyphenate()}
```

or

```fluid
{lih:hyphenate(value: stringContent)}
```

or

```html
<lih:hyphenate value="{stringContent}" />
```

or

```html
<lih:hyphenate>{stringContent}</lih:hyphenate>
```

**The output** is the same for all examples:

```plaintext
Some text&shy;con&shy;tent to apply hy&shy;phen&shy;ti&shy;on to
```

### Example with arguments

```html
<lih:hyphenate value="{stringContent}" leftMin="2" rightMin="3" wordMin="4" defaultLocale="de_CH"></lih:hyphenate>
```

This will use a german hyphenation dictionary with the settings for leftMin, rightMin and wordMin set as specified.

Inline example:

```fluid
{stringContent -> lih:hyphenate(leftMin: 2, rightMin: 3, wordMin: 5)}
```

This will set the values for the arguments leftMin, rightMin and wordMin.

**Arguments**

The following arguments are available for the hyphenate ViewHelper:

-   **defaultLocale**

    -   *Type:* string

    This parameter defines what dictionary to use by default for hyphenation. Defaults to the current locale.

-   **hyphen**

    -   *Type:* string

    String to use as hyphen (e.g. &shy; / "\\xAD" / "\\u{00AD}").

-   **leftMin**

    -   *Type:* int

    How many characters have to be left unhyphenated to the left of the word. This has to be an integer value.

-   **quality**

    -   *Type:* int

    How good shal the hyphenation be. The higher the number the better. THis can be any integer from 0 (no Hyphenation at all) through 9 (berst hyphernation). This defaults to 9. .. warning:: Change this only if you know what you do!

-   **rightMin**

    -   *Type:* int

    How many characters have to be left unhyphenated to the right of the word. This has to be an integer value

-   **value**

    -   *Type:* string

    Text to apply hyphenation to.

-   **wordMin**

    -   *Type:* int

    Words under the given length will not be hyphenated altogether. It makes sense to set option to a higher value than the sum of rightMin and leftMin.
