title: Website language: use browser locale or IP address
body: <p>For a website we're about to implement automatic country/language selection, but still giving the user the choice to change it.</p>
  <p>First of all, if the user enters the website using a domain with a country-level TLD they will be presented the correct language by default. But the question is what should the logic be if they come from generic/international TLD such as .com.
  Should we prefer using the country we get through their IP address or should we use their browser locale? If both, in which sequence?</p>
  <p>As such, I was thinking of this hierarchy:</p>
  <ol>
  <li>Use User selection if it was changed before. If it has never been set explicitly by the user:</li>
  <li>Use hostname TLD. If it is generic (.com):</li>
  <li>Use browser locale. If no locale set or no corresponding language version is available for this locale:</li>
  <li>Use IP address. If no corresponding language version is available for the detected country:</li>
  <li>Use English.</li>
  </ol>