title: how to handle multiple languages on website
body: <p>I have a website that I am translating into different languages. I have the content translated and stored in a database. I also wrote, into the php files, different mechanisms that will display the language based on a global define I set high in the code.  I am happy with all of this.  My question is how do I control this global define?</p>
  
  <p>I currently have a javascript toggle that sets a cookie and then reloads the current page.  And every subsequent page just reads that cookie to set the global define.  It works very well, however I am running into two big problems.  (1) I can't just can't have a url to send to somebody that has the language in it (I could do something like domain.com/forwarder.php?lan=spanish&amp;gotopage=page.php that would set a cookie and then forward, but that's ugly).  And (2), search engines can't view the multiple languages since they don't really use cookies and javascript.</p>
  
  <p>So how do I solve this? Does anybody have experience in this? Can you share your experiences?</p>
  
  <p>I'm leaning towards just using the url and dropping the cookie; that seems popular among various international sites I've seen.  So I'm guessing the urls would be:</p>
  
  <pre><code>domain.com/page       (for english, equivalent to domain.com/en/page)
  domain.com/es/page    (for spanish)
  domain.com/fr/page    (for french)
  etc ......
  </code></pre>
  
  <p>Is this a good idea? I will have to go through my code and prepend all my href's with the language code, which might be a pain.</p>
  
  <p>So does anybody have any comments on this? Is this a good plan? Am I neglecting to realize something?</p>