From mergulhao83 at gmail.com Wed Sep 27 20:53:55 2006 From: mergulhao83 at gmail.com (Sylva =)) Date: Wed, 27 Sep 2006 21:53:55 -0300 Subject: [Gloc-users] My presentation Message-ID: <656871e0609271753x1ecee13cvf7a7865b1b30d738@mail.gmail.com> Hi everyone. I am sending this e-mail to presents me to you. I'm a webdeveloper that like to test languages and frameworks to know how they are good or bed to my webapps. Since i am studing(about 3 or 4 months) ruby language and rails framework i am very excited with it. But i live in Brazil, so I speak portuguese (brazilian portuguese - pt_BR) and I develop apps in brazilian portuguese, sometimes in english too. I learned some documentation of ruby gettext and globalize, but i think they are too complicated to get working. And gloc is what i am searching to localize my apps. YML is the better way i can think to localize static strings(its like ResourceBundle of java). I test gloc and i like it. But 1 feature of the readme wont work: Eg. validates_xxxxxx_of :name, :message => [:user_error_validation_name_too_short, MIN_LEN] To get it working i made: validates_presence_of :category_id,:message => [l(:error_presence,l(:category))] I have some ideas to improve gloc and some of them i had already implemented here. Others I will implement soon. Like the automatic translation of the second argument, so I can do: validates_presence_of :category_id,:message => [:error_presence,:category] And it translates the :category and then :error_presence, and then make the union of the strings: the error message that will be displayed. Another good idea is to override the validates_*_of to translate automagically the field (attribute) name, searching on the YML, if not found prints the default. Its easy to do. I want to colaborate with you to improve Gloc. Thanks for the pacience and sorry for my bad english. Sylvestre.