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 9102153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:18:41+00:00 2026-06-17T01:18:41+00:00

I’m looking for a localisation system to use in a rails 2.2.2 app that

  • 0

I’m looking for a localisation system to use in a rails 2.2.2 app that i manage. I think i’ve seen one before that does exactly what i want but i can’t manage to find it with google.

The system i have in mind works as follows: any ActiveRecord model (or perhaps a list of specified models, listed in a config file for example) can have a translation record associated with it, which specifies a locale and the new values for one or more of the fields in that record, for the listed locale. Please note this is a seperate sort of problem to that solved by i18n: it’s a way of setting locale-specific data, rather than locale-specific names of fields or similar “system-level” strings.

For example, let’s say my site provides music lessons. In the UK (the default locale), musical notes which last one “beat” are called “crotchets”* while in the US they’re called “quarter notes”. So, i might have a lesson that has this data:

#a Lesson object, with an entry in the "lessons" table in the db
id: 1234
name: "My Lesson"
description: "In this lesson you'll learn about crotchets."

and I want this translation record associated with it:

id: 1
translatable_type: "Lesson"
translatable_id: 1234
locale: "US"
data: {:description => "In this lesson you'll learn about quarter notes"}

Now, when i view the lesson, the system checks the current locale, and sees if there’s any current-locale-specific data for this lesson, sees that there is (the description) and displays that instead of the standard description.

Has anyone seen a system like this?

thanks, max

PS – in this example i’ve done a simple string substitution of “crotchets” to “quarter notes”, which might tempt the reader to think i just need some kind of simple string substitution translation. But that’s not the case – some of the US-specific names/descriptions will be quite different to their uk counterparts and so require a completely customisable us-facing name, description, etc.

*this might not be exactly musically true in all cases but that’s outside the scope of this question 🙂

  • 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-06-17T01:18:43+00:00Added an answer on June 17, 2026 at 1:18 am

    I think that Globalize2 may be what you are after for locale-specific data solutions (I’ve had success using Globalize3 for my Rails 3.2 apps). If not, then hopefully the alternative solutions section on Globalize2’s Github repo README file will provide something else that will work for you with Rails 2.2. Good luck!

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a jquery bug and I've been looking for hours now, I can't
I am confused How to use looping for Json response Array in another Array.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I

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.