search for: localized_method

Displaying 2 results from an estimated 2 matches for "localized_method".

2009 May 03
1
Localizing attributes when using I18n
...ields that needs a translation: http://defrang.com/articles/2005/12/02/playing-with-rails-i18n I modified code a little to make it work with rails 2.2: def self.localize(*attribute_names) attribute_names.each do |attribute_name| class_eval %{ def _#{attribute_name} localized_method = "#{attribute_name}_\# {I18n.locale.to_s}" return send(localized_method.to_sym) if respond_to? (localized_method) #{attribute_name} end } end end it works fine for :show, :index, :new. But when I''m trying to create or update, I get the...
2006 Jan 18
15
Anyone got Globalize working???
Hi all In another thread I complain about an error I get after trying to get Globalize working. http://www.ruby-forum.com/topic/51988#new Now I want to ask you, if anybody of you has ever got Globalize working? I have done exactly what''s written in the (absolutely much too short) tutorial of its wiki... http://globalize.diluvia.net/wiki ...and I''m very frustrated that no