# PdfHyphenationPatterns class

> Ready PdfHyphenators for many languages, from TeX's hyph-utf8 patterns under permissive licenses, with the minimum letters before and after a hyphen...

Namespace: [PdfNetStack.Hyphenation](https://www.jadev-corp.com/api/pdfnetstack-hyphenation/)  
Assembly: PdfNetStack.Hyphenation.dll  
Package: `PdfNetStack.Hyphenation`

Ready [PdfHyphenator](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfhyphenator/)s for many languages, from TeX's hyph-utf8 patterns under
permissive licenses, with the minimum letters before and after a hyphen each source gives. A
language loads on first use and stays loaded; the hyphenators are shared and thread safe.

```csharp
public static class PdfHyphenationPatterns
```

**Inheritance**

[object](https://learn.microsoft.com/dotnet/api/system.object) ← 
[PdfHyphenationPatterns](https://www.jadev-corp.com/api/pdfnetstack-hyphenation/pdfhyphenationpatterns/)

## Examples

<pre><code class="lang-csharp">var p = new PdfParagraph { Alignment = PdfTextAlignment.Justify, Hyphenator = PdfHyphenationPatterns.ForLanguage("de") };
var options = new HtmlConverterOptions { Hyphenators = PdfHyphenationPatterns.ForLanguage };</code></pre>

## Properties

### <a id="PdfNetStack_Hyphenation_PdfHyphenationPatterns_Languages"></a> Languages

The tags of the available pattern sets, such as <code>de</code>, <code>en-gb</code> and <code>el-polyton</code>, in order.

```csharp
public static IReadOnlyList<string> Languages { get; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

## Methods

### <a id="PdfNetStack_Hyphenation_PdfHyphenationPatterns_ForLanguage_System_String_"></a> ForLanguage\(string\)

The hyphenator for a language tag, or null when there is none. Case and region do not matter
beyond spelling: <code>de-AT</code> and <code>de_CH</code> find German, <code>en</code> and <code>en-CA</code> American
English, <code>en-GB</code> and <code>en-AU</code> British. German in the 1901 spelling, such as <code>de-1901</code>,
finds nothing: its breaks differ and its patterns are not included.

```csharp
public static PdfHyphenator? ForLanguage(string language)
```

#### Parameters

`language` [string](https://learn.microsoft.com/dotnet/api/system.string)

A language tag such as <code>fr</code> or <code>pt-BR</code>.

#### Returns

 [PdfHyphenator](https://www.jadev-corp.com/api/pdfnetstack-drawing/pdfhyphenator/)?

## Used in

- [Fonts and text in PDF with C# and .NET](https://www.jadev-corp.com/guides/fonts-and-text/)
- [CSS support in PdfNetStack.Html](https://www.jadev-corp.com/guides/html-to-pdf/css-support/)

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-hyphenation/pdfhyphenationpatterns/
