Frederick Cheung
2008-Jul-22 23:52 UTC
Re: get a rails locale language value in a javascript function
On 22 Jul 2008, at 23:06, Erwin wrote:> > in my environment.rb, the languge is defined : > > GLoc.set_config :default_language => :en > > when loading another page , a specific javascript function need to > get this local as a var > var useLanguage = “##” >You''d have to generate some javascript with the appropriate values in it (you could do this from an initializer for example, just write out what you need to public/javascripts/language.js and include that javascript file where relevant). Fred> is it possible ? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---