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

  • SEARCH
  • Home
  • 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 5973027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:44:32+00:00 2026-05-22T20:44:32+00:00

So, my team and I are working on this application, where we use the

  • 0

So, my team and I are working on this application, where we use the DataTables jQuery plugin (http://datatables.net/) to present tabular data provided by our Rails (3.0.7) backend.

We’re having a problem with the interaction between the datatable’s builtin AJAX search and sorting functionalities and Rails’ I18n support. Some of the columns present configuration data that comes from the database (created in the seed file) but is internationalized, since it’s a fixed data set. When the user tries to search or sort, we should perform those operations over the visible, I18n’ed strings. But since search and sorting are delegated to the backend, the controller will perform the required queries over the internal versions of the strings and not the user-visible ones, which will lead to erroneous results.

The solution we thought of first was using the controller to:

  • perform the DB queries without any criteria and store the results;
  • I18n the required values in the result set;
  • then sort/filter the results.

But this would be too demanding on the server. Another option we considered was including the required I18ns in the tables that have I18n-able values, but this breaks the application’s separation of concerns. So we’re at a loss as to what mechanism we should employ to implement this feature. Can anyone help us out?

  • 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-22T20:44:32+00:00Added an answer on May 22, 2026 at 8:44 pm

    We had a similar problem: We had to maintain a db table with artwork names. Occasionally, artworks have different names in other languages. In order for those (we ended up calling them) synonyms to be searcheable, we inserted them into a synonyms table. This might not be a solution for your case.

    Have a look at the ferret gem which provides indexing out of ruby code. You could simply rebuild this index in regular intervals and include the translations. That way, your controller can easily search them and it would not break the separation of concerns, as it is just another representation of your data.

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

Sidebar

Related Questions

There is a team working on acceptance testing X11 GUI application in our company,
Our team is currently working on a large project which makes heavy use of
Our team is working on a new application that we started with Rails 3.1
I am working on a large application in team environment. We use to Team
Our team is experienced working on Winforms and ASP.net projects. As what other programmers
I and a team-mate are working out an web-based application for our company. SQL
I'm working with a team for a bigger application with Delphi 2007. It use
I am working on an asp.net MVC 3 project as a team member. This
Our team is working on Android Application back ended with App Engine. We have
My team working in a project using Winforms application(c#) & MSSQL 2005 as database.

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.