Frederick Cheung | 23 Jul 01:52

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@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

(Continue reading)


Gmane