Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5982089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:02:13+00:00 2026-05-22T22:02:13+00:00

I have a problem regarding submitting multiple locale translations for model data within the

  • 0

I have a problem regarding submitting multiple locale translations for model data within the same form. For example:

Post model:

translates :title

How can I post in the ‘new’ action view which contains the form so that I can submit my title in both :en locale and :fr locale for example?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:02:14+00:00Added an answer on May 22, 2026 at 10:02 pm

    You can take a look at https://github.com/alvarezrilla/batch_translations

    On Rails 3 and globalize3 I had to change a few things for it to work properly. Change all globalize_translations methods to simply translations, remove the proc.binding params to @template.concat and add to your model

    has_many :translations
    accepts_nested_attributes_for :translations
    

    But it’s all working.

    Your form should look something like this:

      <%= form_for(@category) do |f| %>
      <%= render "shared/error_messages", :target => @category %>
      <table class="zebra">
        <tbody>
          <%= f.globalize_fields_for(:fr) do |g| %>
            <tr>
              <td><%= t(:language).humanize %>: <%= t(:french).humanize %></td>
              <td></td>
            </tr>
            <tr>
              <td>
                <%= g.label :name, t(:name).humanize %><br/>
                <%= g.text_field :name %>
              </td>
            </tr>
            <tr>
              <td>
                <%= g.label :description, t(:description).humanize %><br/>
                <%= g.text_area :description, :rows => 40, :cols => 100, :class => "mceEditor" %>
              </td>
            </tr>
          <% end %>
          <%= f.globalize_fields_for(:en) do |g| %>
            <tr>
              <td><%= t(:language).humanize %>: <%= t(:english).humanize %></td>
              <td></td>
            </tr>
            <tr>
              <td>
                <%= g.label :name, t(:name).humanize %><br/>
                <%= g.text_field :name %>
              </td>
            </tr>
            <tr>
              <td>
                <%= g.label :description, t(:description).humanize %><br/>
                <%= g.text_area :description, :rows => 40, :cols => 100, :class => "mceEditor" %>
              </td>
            </tr>
          <% end %>
        </tbody>
      </table>
      <div class="actions">
        <%= f.submit :class=>'button' %> <%= yield :actions %>
      </div>
    <% end %>
    

    If you have more problems, I’ll commit a working version of this for Rails 3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I actually have two questions regarding the same problem but I think it is
I have a problem regarding multiple inclusion of header file in C++ code. Say
I have a problem regarding a JSON string grabbed from WordPress custom post meta.
I have a problem regarding a query where i want to only display data
I have one problem regarding retriving data from database. I have created one database
I encountered a strange problem regarding CoreData and boolean values: In my data model
I have a problem regarding getting the path of a user control. The scenario
I have a problem regarding StartUp Url in WPF. I have a LoginView.xaml and
I have a problem regarding the datediff MYSQL function, I can use it and
I have a question regarding a problem with L2S, Autogenerated DataContext and the use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.