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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:39:00+00:00 2026-05-11T12:39:00+00:00

We have a problem here. We need to translate a website into multiple language.

  • 0

We have a problem here.

We need to translate a website into multiple language. We already use gettext to translate the static content. But we have to translate some text content in multiple language.

The ui isn’t a problem.

We found 2 ways to translate the text. 1. use JSON inside our text input Why this solution is bad. Every text input will need to be bigger because we can’t guess the real size of the attribute.

  1. Use the a translating table that keep reference to the original model and translate every field. It will still need big field because we cant define the field size by record.

  2. Finally, the best solution I came with is creating a translating table. The table will keep foreign key of other tables. For each translation, we copy the record that need to be translated. Inside the translation table, there is 4 field, model_name(primary), reference_id(primary), translated_id(primary), locale(primary). This solution make it impossible to have multiple translation for the same model in the same language.

  3. Last but not least, we could use something like someone proposed…a database gettext. We have a table that contain strings and only string (key, text, locale) so we can search for a model, a string that is the same as the one used in the model and then use the we found instead.

My opinion is that all of these solutions are hack, the 4 solution is probably the one that looks better.

As I didn’t found any good documentation, I would really like to make this question shine.

  • 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. 2026-05-11T12:39:01+00:00Added an answer on May 11, 2026 at 12:39 pm

    Here is how we dealt with the multiple languages (we had some experts look at this solutions as well!).

    • We have text a table in the database (textid, key, nl, uk, de, fr)
    • We have foreignkeys to the text table (from for instance the productnameid)
    • Static text that needs to be translated in html pages is surrounded with hashes: ##name##
    • right before the html content is send from the server to the client the htmlstream is parsed to translate the content between hashes.
    • the translated texts are stored in the cache which makes this solution flexible and still fast

    It works for us, and we build websites that have over 100k pageviews per hour.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer 1) Take a look at function AVDocSetSelection() and the SelectionServer… May 11, 2026 at 8:51 pm
  • Editorial Team
    Editorial Team added an answer Mode TRANSPARENT means that background will not be filled before… May 11, 2026 at 8:51 pm
  • Editorial Team
    Editorial Team added an answer Please disregard my previous bogus answer. There is a race… May 11, 2026 at 8:51 pm

Related Questions

You may have noticed that we now show an edit summary on Community Wiki
I've got a doozy of a problem here. I'm aiming to build a framework
I've got a problem here with an MSI deployment that I'm working on (using
I've got a problem similar to,but subtly different from, that described here (Loading assemblies

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.