Search code examples
ruby-on-railslocalizationlocale

Ruby on rails change local on onchange event


I declared as onchange event as follows

:onchange=>"$(this).format( {format:\"#,###.00\", locale:\"se\"} );

I want to replace locale <%= I18n.locale %> to this which I ve use in java script . How to replace the above by this?


Solution

  • try this

    :onchange=>"$(this).format( {format:\"#,###.00\", locale:\"#{I18n.locale}\"} );