# \[ANN\] Ruby-GetText-Package-0.9.0

**URL:** <https://rubytalk.org/t/ann-ruby-gettext-package-0-9-0/18039>\
**Category:** ruby-talk\
**Created:** [1 May 2005 13:31 UTC](https://rubytalk.org/t/ann-ruby-gettext-package-0-9-0/18039 "2005-05-01T13:31:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Masao\_Mutoh](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Masao\_Mutoh](https://rubytalk.org/u/Masao_Mutoh)\
**Post date:** [1 May 2005 13:31 UTC](https://rubytalk.org/t/ann-ruby-gettext-package-0-9-0/18039/1 "2005-05-01T13:31:03Z")

</div>

Hi,

Ruby-GetText-Package-0.9.0 is now available.

Highlights

> **···**
>
> ----------  
> CGI/ERB is now supported.
> 
> It is inspired from "Using Gettext To Translate Your  
> Rails Application"[\*1]. The documentation is very  
> nice for an application, but not complete as a  
> framework. Because it allows only a textdomain  
> ([messages.mo](http://messages.mo) only).  
> I'm not good at RoR, so I can't improve it now,  
> but I hope someone try "real L10n support" on ROR.
> 
> [\*1] [http://manuals.rubyonrails.com/read/book/16](http://manuals.rubyonrails.com/read/book/16)
> 
> Website  
> -------  
> [http://ponx.s5.xrea.com/hiki/ruby-gettext.html](http://ponx.s5.xrea.com/hiki/ruby-gettext.html)
> 
> \* Ruby-GetText-Package HOWTO  
> &nbsp;&nbsp;[http://ponx.s5.xrea.com/hiki/ruby-gettext-howto.html](http://ponx.s5.xrea.com/hiki/ruby-gettext-howto.html)  
> \* Ruby-GetText-Package HOWTO for CGI/ERB  
> &nbsp;&nbsp;[http://ponx.s5.xrea.com/hiki/ruby-gettext-howto-cgi.html](http://ponx.s5.xrea.com/hiki/ruby-gettext-howto-cgi.html)  
> \* Ruby-GetText-Package API Reference  
> &nbsp;&nbsp;[http://ponx.s5.xrea.com/hiki/ruby-gettext-api.html](http://ponx.s5.xrea.com/hiki/ruby-gettext-api.html)
> 
> What's this?  
> -------------  
> Ruby GetText Package is a Native Language Support Library and  
> Tools which modeled after GNU gettext package.
> 
> Changes since 0.8.1  
> -------------------  
> \* bugfixes.  
> \* CGI support: gettext/cgi  
> \* ERB support: gettext/erb, rgettext.  
> \* Added samples for CGI/ERB to samples/cgi/.
> 
> Translators(samples, rgettext/rmsgfmt)：  
> French - Laurent Sansonetti  
> German - Detlef Reichl  
> Italian - Gabriele Renzi  
> Japanese - Masao Mutoh  
> Portuguese(Brazil) - Joao Pedrosa  
> Spanish - David Espada, David Moreno Garza  
> Swedish - Nikolai Weibull
> 
> Translations for other languages are welcome!  
> # Tell me if you are interested in it.
> 
> --  
> .:% Masao Mutoh\<[mutoh@highway.ne.jp](mailto:mutoh@highway.ne.jp)\>

---

<div class="post-metadata">

**Author:** ![Sasa\_Ebach](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Sasa\_Ebach](https://rubytalk.org/u/Sasa_Ebach)\
**Post date:** [1 May 2005 16:44 UTC](https://rubytalk.org/t/ann-ruby-gettext-package-0-9-0/18039/2 "2005-05-01T16:44:10Z")

</div>

Masao Mutoh wrote:

> Hi,
> 
> Ruby-GetText-Package-0.9.0 is now available.
> 
> Highlights  
> ----------  
> CGI/ERB is now supported.
> 
> It is inspired from "Using Gettext To Translate Your Rails Application"[\*1]. The documentation is very nice for an application, but not complete as a framework. Because it allows only a textdomain  
> (messages.mo only).  
> I'm not good at RoR, so I can't improve it now,  
> but I hope someone try "real L10n support" on ROR.
> 
> [\*1] [http://manuals.rubyonrails.com/read/book/16](http://manuals.rubyonrails.com/read/book/16)

Ah, thank you Masao, I will integrate this as soon as I can. Much appreciated.

The reason for hacking Ruby-GetText to only use one mo file is that virtually any "web" application I know only has one. This has probably to do something with the amount of files you can have in a web app. For example, a web app can have hundreds of template files. You surely wouldn't want to have hundreds of mo files or use #bindtextdomain all over the place. And if you do you can simply not use the hack 😉

You are right about the usage as a framework. It would be nice if this behavior would be configurable so one can use whatever fits best.

Sascha Ebach

---

<div class="post-metadata">

**Author:** ![Masao\_Mutoh](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@Masao\_Mutoh](https://rubytalk.org/u/Masao_Mutoh)\
**Post date:** [2 May 2005 05:48 UTC](https://rubytalk.org/t/ann-ruby-gettext-package-0-9-0/18039/3 "2005-05-02T05:48:01Z")

</div>

Hi,

> Masao Mutoh wrote:  
> \> Hi,  
> \>  
> \> Ruby-GetText-Package-0.9.0 is now available.  
> \>  
> \> Highlights  
> \> ----------  
> \> CGI/ERB is now supported.  
> \>  
> \> It is inspired from "Using Gettext To Translate Your  
> \> Rails Application"[\*1]. The documentation is very  
> \> nice for an application, but not complete as a  
> \> framework. Because it allows only a textdomain  
> \> (messages.mo only).  
> \> I'm not good at RoR, so I can't improve it now,  
> \> but I hope someone try "real L10n support" on ROR.  
> \>  
> \> [\*1] [http://manuals.rubyonrails.com/read/book/16](http://manuals.rubyonrails.com/read/book/16)
> 
> Ah, thank you Masao, I will integrate this as soon as I can. Much  
> appreciated.

I appreciate you too ;). This release is depend on your ideas heavily.

> The reason for hacking Ruby-GetText to only use one mo file is that  
> virtually any "web" application I know only has one. This has probably  
> to do something with the amount of files you can have in a web app. For  
> example, a web app can have hundreds of template files. You surely  
> wouldn't want to have hundreds of mo files or use #bindtextdomain all  
> over the place. And if you do you can simply not use the hack 😉
> 
> You are right about the usage as a framework. It would be nice if this  
> behavior would be configurable so one can use whatever fits best.

It's better to describe faults.

\* It won't work correctly when it requires other libraries which  
&nbsp;&nbsp;&nbsp;support GetText.  
\* You can't separate textdomains in a web app such as "bbs", "scheduler".  
\* If rails uses GetText itself as L10n, it will have "rails" textdomain,  
&nbsp;&nbsp;but it won't work correctly with your hack.

> **···**
>
> On Mon, 2 May 2005 01:44:10 +0900 Sascha Ebach \<se@digitale-wertschoepfung.de\> wrote:
> 
> ---  
> Now, "gettext/container" supports "instance-based/module-based texdomain"  
> not file-based. It's similer with your idea but it allows plural  
> textdomains and it also doesn't affect other libraries which support GetText.  
> #And "gettext/erb" is an instance-based 'ERB' textdomain.
> 
> So I think if a class/module which generates HTML from ERB on rails  
> includes "gettext/erb", then you don't need to call #bindtextdomain on each  
> files and some faults are solved.
> 
> --  
> .:% Masao Mutoh\<mutoh@highway.ne.jp\>

---

<div class="post-metadata">

**Author:** ![Sasa\_Ebach](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Sasa\_Ebach](https://rubytalk.org/u/Sasa_Ebach)\
**Post date:** [2 May 2005 11:02 UTC](https://rubytalk.org/t/ann-ruby-gettext-package-0-9-0/18039/4 "2005-05-02T11:02:40Z")

</div>

> \* It won't work correctly when it requires other libraries which support GetText.

Correct, but not an issue. At least not in Rails applications. And when it is, just don't use the hack.

> \* You can't separate textdomains in a web app such as "bbs", "scheduler".

Correct, but I don't think you need more than one domain in 99% of all Rails apps. In case you do, don't use the hack.

> \* If rails uses GetText itself as L10n, it will have "rails" textdomain,  
> &nbsp;&nbsp;but it won't work correctly with your hack.

Hm, I don't understand fully, but again, if it doesn't work with the hack then don't use the hack.

Aren't these all good points to just make it a feature?

> Now, "gettext/container" supports "instance-based/module-based texdomain"  
> not file-based. It's similer with your idea but it allows plural textdomains and it also doesn't affect other libraries which support GetText.  
> #And "gettext/erb" is an instance-based 'ERB' textdomain.
> 
> So I think if a class/module which generates HTML from ERB on rails includes "gettext/erb", then you don't need to call #bindtextdomain on each  
> files and some faults are solved.

I will have to look into that. Will let you know what I think about it. Might be another week or two though since I am working on some legacy PHP client code at the moment ☹

Sascha
