hi all i have a model ''user'' with a ''country'' references field and a model ''country'' with a ''name'' field. now i''m trying to internationalise my application with globalite. but how do i solve that in my model? shall i create an other field called ''language'' in my model ''country'' or is there an sexier way? maybe without an ''country'' model? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Visit Indonesia 2008
2008-Apr-28 10:04 UTC
Re: internationalise field in model (maybe with globalite)
Let me get you first, what do you want make your web is automatically changing language based to user country? If yes, you do not need create language and model country, you only need to create plugin and in that plugin contains array or hash to detect user''s country and reference the country code or user''s country to translator. You can use mashup method to link your application to google.com/tranlate_t by creating plugin or helper. Reinhart http://teapoci.blogspot.com -- 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 -~----------~----~----~----~------~----~------~--~---
i think i''m nearer at a possible solution, but i didn''t solved it yet :) my current problem: I have a user model, where i want to save the chosen salutation and country. So, i''m using Globalite http://code.google.com/p/globalite/ and i want to use the existing :countries_list.l and my :salutation_list.l My current implementation: http://pastie.caboo.se/188608 Now the problem is, the chosen salutation (and country) will be saved as string into the model. so if the user switches to an other language and visits the user edit page, the salutation (and country) can''t be mapped (taged as ''selected'') because they were saved as strings. Now my question: is there an easy way to map this lists to integers, and only save the integer values into the model, so they can mapped to the right list item, whatever lanugage is chosen? it''s my first multilanguage application :) thx a lot! On 28 Apr., 12:04, Visit Indonesia 2008 <rails-mailing-l...@andreas- s.net> wrote:> Let me get you first, what do you want make your web is automatically > changing language based to user country? If yes, you do not need create > language and model country, you only need to create plugin and in that > plugin contains array or hash to detect user''s country and reference the > country code or user''s country to translator. > You can use mashup method to link your application to > google.com/tranlate_t by creating plugin or helper. > > Reinharthttp://teapoci.blogspot.com > > -- > 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 -~----------~----~----~----~------~----~------~--~---
i think i found a good solution: http://pastie.caboo.se/189227 On 29 Apr., 16:02, spross <silvan.spr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i think i''m nearer at a possible solution, but i didn''t solved it > yet :) my current problem: > > I have a user model, where i want to save the chosen salutation and > country. So, i''m using Globalitehttp://code.google.com/p/globalite/ > and i want to use the existing :countries_list.l and > my :salutation_list.l > > My current implementation:http://pastie.caboo.se/188608 > > Now the problem is, the chosen salutation (and country) will be saved > as string into the model. so if the user switches to an other language > and visits the user edit page, the salutation (and country) can''t be > mapped (taged as ''selected'') because they were saved as strings. > > Now my question: is there an easy way to map this lists to integers, > and only save the integer values into the model, so they can mapped to > the right list item, whatever lanugage is chosen? > > it''s my first multilanguage application :) > > thx a lot! > > On 28 Apr., 12:04, Visit Indonesia 2008 <rails-mailing-l...@andreas- > > s.net> wrote: > > Let me get you first, what do you want make your web is automatically > > changing language based to user country? If yes, you do not need create > > language and model country, you only need to create plugin and in that > > plugin contains array or hash to detect user''s country and reference the > > country code or user''s country to translator. > > You can use mashup method to link your application to > > google.com/tranlate_t by creating plugin or helper. > > > Reinharthttp://teapoci.blogspot.com > > > -- > > 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 -~----------~----~----~----~------~----~------~--~---
Rodrigo Muiño
2008-Jun-03 15:12 UTC
Re: internationalise field in model (maybe with globalite)
We wrote an article that might be useful if you are having issues in the setting up of globalite plugin. Feel free to ask anything you don''t understand. Rodrigo On Wed, Apr 30, 2008 at 8:02 AM, spross <silvan.spross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > i think i found a good solution: http://pastie.caboo.se/189227 > > On 29 Apr., 16:02, spross <silvan.spr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > i think i''m nearer at a possible solution, but i didn''t solved it > > yet :) my current problem: > > > > I have a user model, where i want to save the chosen salutation and > > country. So, i''m using Globalitehttp://code.google.com/p/globalite/ > > and i want to use the existing :countries_list.l and > > my :salutation_list.l > > > > My current implementation:http://pastie.caboo.se/188608 > > > > Now the problem is, the chosen salutation (and country) will be saved > > as string into the model. so if the user switches to an other language > > and visits the user edit page, the salutation (and country) can''t be > > mapped (taged as ''selected'') because they were saved as strings. > > > > Now my question: is there an easy way to map this lists to integers, > > and only save the integer values into the model, so they can mapped to > > the right list item, whatever lanugage is chosen? > > > > it''s my first multilanguage application :) > > > > thx a lot! > > > > On 28 Apr., 12:04, Visit Indonesia 2008 <rails-mailing-l...@andreas- > > > > s.net> wrote: > > > Let me get you first, what do you want make your web is automatically > > > changing language based to user country? If yes, you do not need create > > > language and model country, you only need to create plugin and in that > > > plugin contains array or hash to detect user''s country and reference > the > > > country code or user''s country to translator. > > > You can use mashup method to link your application to > > > google.com/tranlate_t by creating plugin or helper. > > > > > Reinharthttp://teapoci.blogspot.com > > > > > -- > > > 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 -~----------~----~----~----~------~----~------~--~---
Rodrigo Muiño
2008-Jun-03 15:12 UTC
Re: internationalise field in model (maybe with globalite)
Sorry, I forgot to paste the url http://www.bluebrains.com.ar/articles/setting-up-globalite Rodrigo On Tue, Jun 3, 2008 at 12:12 PM, Rodrigo Muiño <rodrimuino-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> We wrote an article that might be useful if you are having issues in the > setting up of globalite plugin. > > Feel free to ask anything you don''t understand. > > Rodrigo > > > On Wed, Apr 30, 2008 at 8:02 AM, spross <silvan.spross-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> >> i think i found a good solution: http://pastie.caboo.se/189227 >> >> On 29 Apr., 16:02, spross <silvan.spr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > i think i''m nearer at a possible solution, but i didn''t solved it >> > yet :) my current problem: >> > >> > I have a user model, where i want to save the chosen salutation and >> > country. So, i''m using Globalitehttp://code.google.com/p/globalite/ >> > and i want to use the existing :countries_list.l and >> > my :salutation_list.l >> > >> > My current implementation:http://pastie.caboo.se/188608 >> > >> > Now the problem is, the chosen salutation (and country) will be saved >> > as string into the model. so if the user switches to an other language >> > and visits the user edit page, the salutation (and country) can''t be >> > mapped (taged as ''selected'') because they were saved as strings. >> > >> > Now my question: is there an easy way to map this lists to integers, >> > and only save the integer values into the model, so they can mapped to >> > the right list item, whatever lanugage is chosen? >> > >> > it''s my first multilanguage application :) >> > >> > thx a lot! >> > >> > On 28 Apr., 12:04, Visit Indonesia 2008 <rails-mailing-l...@andreas- >> > >> > s.net> wrote: >> > > Let me get you first, what do you want make your web is automatically >> > > changing language based to user country? If yes, you do not need >> create >> > > language and model country, you only need to create plugin and in that >> > > plugin contains array or hash to detect user''s country and reference >> the >> > > country code or user''s country to translator. >> > > You can use mashup method to link your application to >> > > google.com/tranlate_t by creating plugin or helper. >> > >> > > Reinharthttp://teapoci.blogspot.com >> > >> > > -- >> > > 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 -~----------~----~----~----~------~----~------~--~---