title: Rails 3 Internationalization (I8n) locale set from domain name problem
body: <p>I created one rails 3 website which can be reached at whereisdaniel.com and whereisdaniel.ru The website at .com should serve up the English version and the site at .ru should serve up the Russian version.</p>
  
  <p><strong>Locally, everything works.</strong> However, at my deployed website everything works at first, but after going to the .ru site, trying to switch to the .com version results in a Russian translation. The only thing I can figure is that there is some sort of problem with my nginx / passenger configuration.</p>
  
  <p>My configuration file looks like this:</p>
  
  <pre><code>nginx.conf
  
  server {
    listen 80;
    server_name whereisdaniel.com whereisdaniel.ru;
    root /home/dan/whereisdaniel/public/;
    passenger_enabled on;
  }
  </code></pre>
  
  <p>The rest of my code I cut and pasted directly from the Rails Guides here:
  <a href="http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name" rel="nofollow">http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the-domain-name</a></p>
  
  <p><strong>One more smaller / additional problem:</strong>
  The only thing I didn't implement from the Rails Guides was this part of the guide because I didn't understand how:</p>
  
  <pre><code>link_to("Deutsch", "#{APP_CONFIG[:deutsch_website_url]}#{request.env['REQUEST_URI']}")
  </code></pre>
  
  <p>Instead of this I just have basic html links to the different site urls. Actually, I'd like to understand how to how/where to create that APP_CONFIG constant if anyone knows. </p>