title: Which multilingual web design solution is fastest for the user, if this is indeed an issue?
body: <p><strong>Context:</strong></p>
  
  <p>I'm in the design phase of what I'm hoping will be a big website (lots of traffic, lots of users reading and writing to database).
  I want to offer this website in the three languages I speak myself (English, French, and by the time I finish the website, I will hopefully have learned enough Spanish to offer that too)</p>
  
  <p><strong>Dilemma:</strong></p>
  
  <p>I'm wondering how I should go about offering these various languages (and perhaps more in the future).</p>
  
  <p><strong>Criteria:</strong></p>
  
  <p>Many methods exist for designing multi-language websites. I'm looking for the technique that will result in a <strong>faster browsing experience</strong> for the user.</p>
  
  <p><strong>Choices:</strong></p>
  
  <p>Currently, I can think of (and have read about) the following choices. They are sorted in order of preference up to now.</p>
  
  <ol>
  <li><p><strong>Store all language-specific strings
  in a database</strong> and fetch the good one
  depending on prefered-language
  (members can choose which language
  they prefer),
  browser-default-language and which
  language is selected during the
  current session, in that order.</p>
  
  <p><strong><em>Pros:</em></strong></p>
  
  <ul>
  <li>Most of the time, a single
  test at the beggining of the session
  confirms which language to use for
  the remainder of the session (stored
  in a SESSION variable). Otherwise, a
  user logging in also fetches the
  right language and keeps it until
  he/she logs out (no further tests). So the testing part should be
  pretty fast.</li>
  </ul>
  
  <p><strong>Cons:</strong></p>
  
  <ul>
  <li>I'm afraid that accessing the
  database all the time would be quite
  time-consuming (longer page load for
  the user), especially considering
  that lots of users could also be
  accessing the database at the same
  time for the same reason (getting the website text in the correct language), but also
  for posting comments and the such.</li>
  <li>Strings which include variables
  (e.g. "Hello " + user.name + ", how
  are you?") are harder to
  store because the variable (e.g.
  user name) changes for each user.</li>
  <li>A direct link to a portal for a specific language would be ugly (e.g. www.site.com?lang=es)</li>
  </ul></li>
  <li><p><strong>Store all language-specific strings
  in a text file</strong> and fetch the good one
  depending on prefered-language
  (members can choose which language
  they prefer),
  browser-default-language and which
  language is selected during the
  current session, in that order.</p>
  
  <p><strong><em>Pros:</em></strong></p>
  
  <ul>
  <li>Most of the time, a single
  test at the beggining of the session
  confirms which language to use for
  the remainder of the session (stored
  in a SESSION variable). Otherwise, a
  user logging in also fetches the
  right language and keeps it until
  he/she logs out (no further tests). So the testing part should be
  pretty fast.</li>
  </ul>
  
  <p><strong>Cons:</strong></p>
  
  <ul>
  <li>I'm afraid that accessing the
  text file all the time would be quite
  time-consuming (longer page load for
  the user), especially considering
  that lots of users could also be
  accessing the file at the same
  time for the same reason (getting the website text in the correct language).</li>
  <li>Strings which include variables
  (e.g. "Hello " + user.name + ", how
  are you?") are harder to
  store because the variable (e.g.
  user name) changes for each user.</li>
  <li>I don't think multiple users could access the text file concurrently, though I may be wrong. If that's the case though, every user loading a page would have to wait for his/her turn to access the text file.</li>
  <li>Fetching the very last string of the text file could be pretty long...</li>
  <li>A direct link to a portal for a specific language would be ugly (e.g. www.site.com?lang=es)</li>
  </ul></li>
  <li><p><strong>Creating multiple versions of the website</strong> in seperate folders, where each version is in a different language.</p>
  
  <p><strong><em>Pros:</em></strong></p>
  
  <ul>
  <li>No extra-treatment is needed for handling languages, so no extra waiting time.</li>
  </ul>
  
  <p><strong><em>Cons:</em></strong></p>
  
  <ul>
  <li>Maintaining the website will be like going to school: painfull, long, makes you stupid after doing the same thing over and over again.</li>
  <li>ugly url (e.g. www.site.com/es/ instead of www.site.com)</li>
  </ul></li>
  </ol>
  
  <p><strong>Additionnaly</strong>, the coices above could be combined with one or more of the following techniques:</p>
  
  <ol>
  <li><p><strong>Caching</strong> certain frequently requested pages (in a singleton or static PHP function?). Certain sentences could also be cached for every language.</p>
  
  <p><strong><em>Pros</em></strong></p>
  
  <ul>
  <li>Quicker access for frequently-requested pages.</li>
  <li>Which pages need caching can be determined dynamically, with time.</li>
  </ul>
  
  <p><strong><em>Cons</em></strong></p>
  
  <ul>
  <li>I'm not sure about this one, but would this end up bloating the server's RAM?</li>
  </ul></li>
  <li><p><strong>Rewritting the url</strong> could be used for many things.</p>
  
  <ul>
  <li>A user looking for direct access to one language could do so using www.site.com/fr/somefile and would be redirected to www.site.com/somefile, but with the language selected beign stored in a session variable.</li>
  </ul>
  
  <p><strong><em>Pros</em></strong></p>
  
  <ul>
  <li>Search engines like this because they have two different pages to show for two different languages</li>
  </ul>
  
  <p><strong><em>Cons</em></strong></p>
  
  <ul>
  <li>Bookmarking a page doesn't mean you'll en up with the right language when you come back, unless I put the language information in the url (www.site.com/somefile?lang=fr)</li>
  </ul></li>
  </ol>
  
  <p><strong>A little more info</strong></p>
  
  <p>I usually user the following technologies to make a website:</p>
  
  <ul>
  <li>PHP</li>
  <li>SQL</li>
  <li>XHTML</li>
  <li>CSS</li>
  <li>Javascript (and AJAX)</li>
  </ul>
  
  <p>This being said, if a solution requires that I learn a new language or something, I'm very open to doing so. I have no deadline for this project and I do intend to learn a lot from doing it!</p>
  
  <p><strong>Conclusion:</strong></p>
  
  <p>What I'm looking for is a method that allows me to offer multiple languages while not increasing page load time and not going crazy when trying to maintain the website. If you guys/gals have other ideas I should consider, I will try adding them to my list. Another possibility is that I'm overdoing this. Maybe I won't gain enough time with these methods for this all to be worth it, I just don't know how to verify if I need to worry about this or not.. so if you have any ideas for that, it would also help me.</p>