# Request for Duration library localizations

**URL:** <https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868>\
**Category:** Ruby\
**Created:** [December 21, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868 "2007-12-21T15:31:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhinton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mhinton](https://www.ruby-forum.com/u/mhinton)\
**Post date:** [December 21, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868/1 "2007-12-21T15:31:00Z")

</div>

If you speak another language and would like to contribute to the  
Duration library, you can contribute largely by writing short  
translation files!

You can install Duration like-so:  
$ gem install -r duration (may need to be root)

The default English localization can be used as a sample reference to  
building your own. Currently there are two localizations, English and  
Korean.

The English localization can be found at:  
[http://pastie.caboo.se/131325](http://pastie.caboo.se/131325)

Thanks in advance to anyone who comes up with translations 🙂  
Also, since I can’t verify the correctness of anyone’s translations, I  
would also appreciate any feedback it (because I only speak two  
languages).

---

<div class="post-metadata">

**Author:** ![mhinton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mhinton](https://www.ruby-forum.com/u/mhinton)\
**Post date:** [December 21, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868/2 "2007-12-21T18:45:30Z")

</div>

|Matthew H.|

MH\> The English localization can be found at:  
MH\> [Parked at Loopia](http://pastie.caboo.se/131325)  
Other languages may have more than 1 plural form. See for example  
[Linux Development - Mandriva Linux](http://archives.mandrivalinux.com/cooker-i18n/2006-12/msg00010.php)

---

<div class="post-metadata">

**Author:** ![mhinton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mhinton](https://www.ruby-forum.com/u/mhinton)\
**Post date:** [December 21, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868/3 "2007-12-21T22:58:39Z")

</div>

Matthew H. wrote:

> If you speak another language and would like to contribute to the  
> Duration library, you can contribute largely by writing short  
> translation files!

dutch.rb is attached.

---

<div class="post-metadata">

**Author:** ![mhinton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mhinton](https://www.ruby-forum.com/u/mhinton)\
**Post date:** [December 21, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868/4 "2007-12-21T22:05:32Z")

</div>

Le 21 décembre 2007 à 15:30, Matthew H. a écrit :

> The default English localization can be used as a sample reference to  
> building your own. Currently there are two localizations, English and  
> Korean.

French is quite straightforward :

class Duration  
module Localizations  
# French localization  
module French  
LOCALE = :french  
PLURALS = %w(secondes minutes heures jours semaines)  
SINGULARS = %w(seconde minute heure jour semaine )  
FORMAT = proc do |duration|  
str = duration.format(’%w %~w, %d %~d, %h %~h, %m %~m, %s %~s’)  
str.sub(/^0 [a-z]+,?/i, ‘’).gsub(/ 0 [a-z]+,?/i,  
‘’).chomp(’,’).sub(/, (\d+ [a-z]+)$/i, ’ et \1’).strip  
# Produit un message du genre :  
# 10 semaines, 2 jours, 3 heures, 4 minutes et 5 secondes  
end  
end  
end  
end

Fred

---

<div class="post-metadata">

**Author:** ![mhinton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mhinton](https://www.ruby-forum.com/u/mhinton)\
**Post date:** [December 22, 2007, 11:20pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868/5 "2007-12-22T23:20:32Z")

</div>

Polish should be simple too, problem might be “Å„” which is polish  
diacritical.

[http://pastie.caboo.se/131743](http://pastie.caboo.se/131743)

---

<div class="post-metadata">

**Author:** ![mhinton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@mhinton](https://www.ruby-forum.com/u/mhinton)\
**Post date:** [January 8, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/request-for-duration-library-localizations/123868/6 "2008-01-08T21:14:08Z")

</div>

> Thanks in advance to anyone who comes up with translations 🙂  
> Also, since I can’t verify the correctness of anyone’s translations,  
> I would also appreciate any feedback it (because I only speak two  
> languages).

I‘m late to the game. Here’s the German:  
[http://pastie.caboo.se/136835](http://pastie.caboo.se/136835)

-Ben
