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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. On Mar 28, 8:44 pm, Alex Sommer <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > I have a problem withgettext. 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 > checkGetText.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! > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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, On 3月29日, 下午10时24分, Alex Sommer <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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. > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---