title: Supporting multiple languages in a REST API
body: <p>I have a collection of cities for which I'm creating a REST API (my first REST API). Each city has a number of language independent things, such as founding date and population count. Cities also have things that depend on the language, such as the title and a short description. Internally the city documents have this format:</p>
  
  <pre><code>{
     "population": 9042,
     "name": {
         "en": "Berlin",
         "nl": "Berlijn",
         // ...
     },
     // ...
  }
  </code></pre>
  
  <p>The users of my API always want to view the city info for a specific language only, and get back something like:</p>
  
  <pre><code>{
     "population": 9042,
     "name": Berlin,
     // ...
  }
  </code></pre>
  
  <p>I've made these accessible via <code>/cities/:id/:language_code</code>, for instance <code>cities/123/en</code>. Now I want to implement listing of cities: <code>GET /cities</code>. There the requested language is also needed. Since this would result in <code>/cities/:language_code</code>, I'm getting the impression putting this at the end of the url is not a good idea, and suspect I'll be better off with <code>/en/cities/...whatever...</code>.</p>
  
  <p>How is this typically done in REST APIs? Any big, nicely implemented, API out there that is a good example?</p>