# Text::hyphen, de patterns

**URL:** <https://www.ruby-forum.com/t/text-hyphen-de-patterns/60582>\
**Category:** Ruby\
**Created:** [May 15, 2006, 8:58pm UTC](https://www.ruby-forum.com/t/text-hyphen-de-patterns/60582 "2006-05-15T20:58:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [May 15, 2006, 8:58pm UTC](https://www.ruby-forum.com/t/text-hyphen-de-patterns/60582/1 "2006-05-15T20:58:52Z")

</div>

Hello,

I’d like to use text::hyphen, and I’d like to know how to use german  
hyphenation patterns. There are two files de1.rb and de2.rb in the  
distribution,  
but what parameter should I use to the Text::Hyphen.new method?

Regards,

Patrick

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [May 15, 2006, 9:37pm UTC](https://www.ruby-forum.com/t/text-hyphen-de-patterns/60582/2 "2006-05-15T21:37:02Z")

</div>

On 5/15/06, Patrick G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I’d like to use text::hyphen, and I’d like to know how to use german  
> hyphenation patterns. There are two files de1.rb and de2.rb in the  
> distribution, but what parameter should I use to the Text::Hyphen.new method?

I will have to make this easier to use, but:

require ‘text/hyphen’  
require ‘text/hyphen/language/de1’

hyp = Text::Hyphen.new  
hyp.language = Text::Hyphen::Language::DE

Let me think about this for a while to figure out a clean API for  
these multiply named language definitions.

-austin

---

<div class="post-metadata">

**Author:** ![pgundlach](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Post date:** [May 15, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/text-hyphen-de-patterns/60582/3 "2006-05-15T22:09:07Z")

</div>

Hello Austin,

> I will have to make this easier to use, but:
> 
> require ‘text/hyphen’  
> require ‘text/hyphen/language/de1’
> 
> hyp = Text::Hyphen.new  
> hyp.language = Text::Hyphen::Language::DE
> 
> Let me think about this for a while to figure out a clean API for  
> these multiply named language definitions.

thanks, works like a charm,

Patrick
