app/views/translations/index.html.erb
<div class="span12">
<h1><%= I18n.t(:translations ) %></h1>
<script>
$(document).ready(function() {
$("#available_locales").change(function(){
$.ajax({ url: '/load_translations',
data: 'locale=' + this.value
})
});
})
</script>
<%= form_tag translations_path(:locale => params[:locale]), :remote => true, :class => 'simple_form' do %>
<p>
<%= I18n.t(:choose_locale) %> <%= select_tag 'available_locales', options_for_select(@available_locales, :selected => params[:locale] || session[:current_locale]), :prompt => I18n.t('helpers.select.prompt') %>
</p>
<div id="list_translations">
<%= render :partial => 'list_translations', :object => @translations %>
</div>
<%= submit_tag I18n.t('save_translations'), :class => 'btn' %>
<% end %>
</div>