how a js script can get the current locale from my rails app ?

I am not very fluent in JS, so I don't see how to transfer the rails
app current locale ..

I have a JS script able to detect the default browser language ..
running fine

I can also modify the JS language, passing a global var ..

   // Create a JSON Object
  var myJSON = {
    "lang": "fr"
  };
  // Pass it to the script immediately...
  datePickerController.setGlobalVars(myJSON);

and it runs ... but I would like this script to use the language
selected by the rails app user :
the I18n.default_locale being modified in the rails app

any clue ?

thanks a lot ..

erwin

Couldn't you pass that back in your page's view template?