gettext does not work, but no errors!

Hi I have a problem with gettext. I did some eays steps from a forum wihout any problems:

1. Replace Strings with _('balbalbal') 2. build po file with rake-task /po/de_DE/domain.po 3. Edit this file 3. build mo file with rake-task /locale/de_DE/LC_MESSAGES/domain.mo 4. insert "require 'gettext/rails'" and "init_gettext 'domain'" to applicationController

If I start my application it works without any error-message but the Strings are not replaced with strings from the domian.mo file. If I check GetText.local it is "de_DE"! So why does it not work?

I also fount out this: If I remove "require 'gettext/rails'" from ApplicationController the init_gettext method already works without errors. I don't know why.

Thanks for any help!

We also got the same problem on Fedora Linux 8 and RH enterprise server 5.

However, it seems ok for Ubuntu. I tried all the fixes and ideas available from the forums, but cannot make it working for FC8 and RH ES5.

The problem is some like this:

1. It works for error messages, for example, those for validations in model files. 2. It does not working for all the translations in templates in app/ views directory. 3. There is no error message at all for rake tasks and the pot and mo files are generated ok.

Masao, I suggest you have a close look into this issue.

Thanks.

Hi,

I fount a solution. But at first a comment:

What do you mean by "f I remove "require 'gettext/rails'" from

ApplicationController the init_gettext method already works without errors."? Does this mean you have already made it working?

With no errors I mean no exceptions in error log!

So the solution was very easy: I switched from Rails 1.2.3 to 2.0.2! Thats all! I worked with a tutorial which based on 1.2.3. In this tutorial was also a descrition of gettext, but without any comment about the version of gettext. I think the latest Version of gettext does not work with some old rails version.

No, it seems we have different problems.

I am using Rails 2.0.2 and Ruby 1.8.6. Both are the newest versions. Only validation error messages in models are displayed based on locale. This seems OS package dependent, since we do not have the problem with Ubuntu but only for RH Linux.

Anyone can help?

Thanks,