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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:00:40+00:00 2026-05-12T11:00:40+00:00

Hoping some learned Rails developers here can recommend an existing Ruby on Rails plugin

  • 0

Hoping some learned Rails developers here can recommend an existing Ruby on Rails plugin or gem that allows you to continue using the Simple I18n backend whilst allowing you to optionally specify translations in the database.

Here’s why:

I have one Rails app used for many websites. For the example I’ll just use 2 websites:

Website 1: Leprechauns R Us

Website 2: Unicorns R Us

Most translations are the same for both websites, but occassionally I want to override a translation. For example, in my en-US.yml file I have the following translation:

view_all: View all

And for most websites this translation is fine, including for website 1 (Leprechauns) where I’m happy to use “View all”.

However, for website 2, I’d like to use “View all Unicorns” as the view_all translation and I’d like to specify this in the database. For maintenance reasons I don’t want to specify this override in a YAML file.

Many thanks,

Eliot

  • 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-12T11:00:40+00:00Added an answer on May 12, 2026 at 11:00 am

    In the end I opted to take advantage of Rails’ I18n::Backend::Simple’s ability to process both .yml files and .rb files as locale dictionaries.

    Artifacts created:

    1. DB migration to create a translations table with columns: locale, key, text

    2. Translation model to map to the translations table

    3. Class method to_locale_hash on Translation model that returns a locale keyed hash as required by I18n::Backend::Simple.load_rb

    4. A single-line file located at config/translations.rb with the line ‘Translation.to_locale_hash’

    For the source code see the Spree extension (sorry not in a Rails plugin structure, it will be easy to move over to a plugin should you require it) here:

    http://github.com/eliotsykes/spree-i18n-db/tree/master

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

Sidebar

Ask A Question

Stats

  • Questions 209k
  • Answers 209k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Can you use R to replace MATLAB? Yes. I used… May 12, 2026 at 9:46 pm
  • Editorial Team
    Editorial Team added an answer I know this is MIT Scheme, not DrScheme, but have… May 12, 2026 at 9:46 pm
  • Editorial Team
    Editorial Team added an answer We use the command pattern to queue up units of… May 12, 2026 at 9:46 pm

Related Questions

I'm relatively new to Subversion, hoping to get some insights from more experienced folks.
I have been working on standardizing the source control structure for our Team Foundation
I recently learned of the IIF(A,B,C) function. I'm a long time VB/VB.NET Coder who
In this thread some one commented that the following code should only be used

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.