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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:37:52+00:00 2026-06-05T14:37:52+00:00

For example i have project model and 5 available locales. User should be able

  • 0

For example i have project model and 5 available locales. User should be able to create project localized to those 5 locales?
What is the best way to add this kind of feature, is there some rails way for this?
I understand that i should store all those translations in database, but something like text_en, text_pt, text_es, text_fr, text_it for each field is scares me.
Can you give me an advice? Thanks!

UPD. Seems like i find nice tool for the job https://github.com/svenfuchs/globalize3 🙂

  • 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-05T14:37:55+00:00Added an answer on June 5, 2026 at 2:37 pm

    You may want to use a serialized attribute for locale-dependent data, and define a title (or anything) as a hash:

    class Project
      serialize :title, Hash
    ...
    
    p.title[:pt] = "title in pt"
    

    The problem will be that you will not be able to do SQL search for the textual values. If you want to search projects by names, just extract the locale-dependent attributes to another table:

    class Project
      has_many :titles
    end
    
    class Title
      belongs_to :project
      belongs_to :locale # or just put there a string attribute
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wants to access a method in different project. as example i have called
I have a simple java project (adapted from the example here ), which is
1.I have successfully run the ScanTest example project in my xcode4.2.1 2.And then I
i'm download DrillDownApp example project from iPhoneSDKArticles i have a problem when i'm try
I have been looking at the example posted on OpenNTF - http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=Threads%20and%20Jobs my issue
I need to have : http://www.example.com/v1/my-project/ redirected to http://example.com/my-project/ so : (1) remove the
I have an ant script with the following header: <project name=Simple ActiveJDBC Example default=clean
I have a rails project where project model has many issues. class Project <
I have worked a bit with Django and I quite like its project/applications model
I have these tables: class Contract(models.Model): project = models.ForeignKey(Project) start_date = models.DateField() agreed_contacts =

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.