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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:50:13+00:00 2026-05-15T17:50:13+00:00

My web site (on Linux servers) needs to support multiple languages. What is the

  • 0

My web site (on Linux servers) needs to support multiple languages.
What is the best practice to have/store multiple languages versions of the same site?
Some I can think of:

  1. store in DB
  2. different view file for each language
  3. gettex
  4. hard coded words in PHP files (like in phpBB)
  • 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-15T17:50:14+00:00Added an answer on May 15, 2026 at 5:50 pm

    With web sites, you really have several categories of content to consider for localization:

    1. The article-type content elements that you would in many cases create, edit and publish in a CMS.
    2. The smaller content blocks that are common to every page (or a sub-group of pages), such as tagline, blurb, text around a contact form, but also imported content such as a news ticker or ads and affiliate links. Some of these may only appear for one language (for example, if you don’t offer some services in some regions, or don’t have, say, language-appropriate imported content for a particular language: it can be better to remove an element rather than offering English to people who may not speak it).
    3. The purely functional elements, like “Click here to comment”, “More…”, high-level navigation, etc., which are sometimes part of your template. Some of these may be inside images.

    For 1. the main decision is using a CMS or not. If yes, you absolutely need to choose one that supports multiple languages. I’m not up-to-date with recent developments in PHP CMS’s, but several of the Django CMS apps (Django-CMS-2, FeinCMS) support multi-language content. Don’t forget that date stamps, for example, need to be localized, too (or you can get around this by choosing ISO dates, though that may not always be possible). If you don’t use a CMS, and everything is in your HTML files, then gettext is the way to go, and keep the .mo files (and your offline .po files) in folders by language.

    For 2. if you have a CMS with good multi-lingual support, get as much as possible inside the CMS. The reason is that these bits do change, and you want to edit your template as little as possible. If you write code yourself, think of ways of exporting all in-CMS strings per language, to hand them to translators. Otherwise, again, gettext. The main issue is that these elements may require hard-coding language-selection code (if $language = X display content1 ...)

    For 3., if it’s in your template, use gettext. For images, the per-language folders will come in handy, and for heaven’s sake make choose images the generation of which can be automated, or you (or your graphic artist) will go mad with editing 100s of custom images with strings in languages you don’t understand.

    For both 2. and 3., abstracting from the language selection may help selecting the appropriate blocks or content directory (where localized images or .mo files are kept).

    What you definitely want to avoid is keeping a pile of HTML files with extensive text content in them that would be a nightmare to maintain.

    EDIT: Everything about gettext, .po and .mo files is in the GNU gettext manual (more than you ever wanted to know) or a slightly dated but friendlier tutorial. For PHP, there’s are the PHP gettext functions, and also the Zend Locale documentation

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

Sidebar

Related Questions

I have developed a web site that requires user registration and authentication for some
I've have a web site I'm building using NodeJS, that needs to serve up
I currently have a web site hitting 7 Access DBs that I desperately need
We have several Python 2.6 applications running on Linux. Some of them are Pylons
I have been trying to create a web service out some python scripts, and
I'm working on a web site under a Linux environment (Debian). I'm not an
I have a dedicated Linux web server where my website is running like www.example.com.
I have a website hosted on a Linux server. If someone sends me an
I am developing a website in linux in codeigniter I have the below url
For completeness I have downloadded the following archive files from the JOGL website; jogamp-linux-amd64.7z

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.