Hi, I a new user of ruby on rails (2.3.4) and globalize 2 (0.2.0). I have some prolems to use globalize2. I think globalize 2 is powerfull and perhaps I don't understand how it works... with the documentation, the use seems very simple globalize2 manage all the stuff behind.... ok ok... my problem is : I want create a model with the default language (:fr) so it's simple to do that... but after I want create another translations of this model (:en or :es or :de or :it ..) without change of the current language... and the validation have to works on this translation to.... is it possible and how ? many thanks in advance...
on 2010-01-22 00:16
on 2010-01-22 17:22
Ok I look further in the plug in and I found one method "set_translations" which do what I wished... but without validations example : I have a Comment model with two translated field and validations on it >> I18n.locale => :fr >> com = Comment.new("title"=>"lalalalal","content"=>"le francais") => #<Comment id: nil, value: 12, created_at: nil, updated_at: nil> >> com.valid? => true >> com.save => true >> com2.set_translations("en"=>{"title"=>"","content"=>"test en"},"it"=>{"title"=>"test it","content"=>""}) => ["it", "en"] When I create a new comment the validation is performed (great) but when I want add another locale to the same comment with the "set_translations" method in this case the validations is not performed... is there an issue for this. After with the web interface I changed the default_locale to :en and I edited my comment this time in english, in this case also the validation is performed .. ? why the validation can't be performed with the “set_translations” method ?? many thanks in advance...
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.