title: How to build PHP application with multiple language support (English, French, Chinese etc..)
body: <p>I'm building a web application that uses LAMP and the Smarty template framework.  The website will have plenty of static content (about us page, error alerts, confirmation emails etc...).  </p>
  
  <p>The web application must support multiple languages.  Is the following approach appropriate?</p>
  
  <p>1) All static copy on Smarty template pages (html pages) will be replaced by calls to smarty plugins such as {lang file='about.xml' getTerm='title'} which returns a string for the title tag in the appropriate language</p>
  
  <p>2) The file about.xml is an xml document on the webserver that acts as a multiple language dictionary.  So it will have xml nodes such as</p>
  
  <pre><code>&lt;term value="title"&gt;
     &lt;en&gt;&amp;lt;a href=&amp;quot;http://stackoverflow.com&amp;quot;&amp;rt;Stackoverflow&amp;lt;/a&amp;rt; is a great site&lt;/en&gt;
     &lt;fr&gt;&amp;lt;a href=&amp;quot;http://stackoverflow.com&amp;quot;&amp;rt;Stackoverflow&amp;lt;/a&amp;rt; c'est website magnifique&lt;/fr&gt;
     &lt;ch&gt;&amp;lt;a href=&amp;quot;http://stackoverflow.com&amp;quot;&amp;rt;Stackoverflow&amp;lt;/a&amp;rt; complex looking chinese characters I don't udnerstand&lt;/ch&gt;
  &lt;/term&gt;
  &lt;term value="signupmessage"&gt;
     &lt;en&gt;&amp;lt;a href=&amp;quot;http://stackoverflow.com&amp;quot;&amp;rt;Stackoverflow&amp;lt;/a&amp;rt; great deals!&lt;/en&gt;
     &lt;fr&gt;&amp;lt;a href=&amp;quot;http://stackoverflow.com&amp;quot;&amp;rt;Stackoverflow&amp;lt;/a&amp;rt; magnifique deals!&lt;/fr&gt;
     &lt;ch&gt;&amp;lt;a href=&amp;quot;http://stackoverflow.com&amp;quot;&amp;rt;Stackoverflow&amp;lt;/a&amp;rt; complex looking chinese characters I don't udnerstand&lt;/ch&gt;
  &lt;/term&gt;
  </code></pre>
  
  <p>3) The url structure for the site will be <code>http://mywebsite.com/language/index.php</code>.  To do this, my webserver will have symbolic links such as 
  <code>ln -s ./en ./</code>      so that <code>http://mywebsite.com/en/index.php</code> points to the same php page as <code>http://mywebsite.com/fr/index.php</code>, but I will check the url for language settings.    My hope is that google will index both versions of the site.</p>
  
  <p>Is this a good approach?  Is xml the best format for storing content of different languages even though it has htmlentity encoded html tags?  Did I overlook anything?</p>