foursquare venue result locale
<p><a href="https://developer.foursquare.com/overview/versioning" rel="nofollow noreferrer">https://developer.foursquare.com/overview/versioning</a> it says:</p>

<blockquote>
  <p>You can specify the locale by setting the Accept-Language HTTP header in your request. Alternatively, you can add a locale=XXX parameter to your request but HTTP header specification is preferred. We currently support en (default), es, fr, de, it, ja, th, tr, ko, ru, pt, and id.</p>
</blockquote>

<p>and </p>

<blockquote>
  <p>If nothing is specified, for geographical entities (e.g., city names), we'll fall back to using the language that's most popular in the country for that venue.</p>
</blockquote>

<p>Now, how do we get the locale of the API result? If I query with <code>tr</code> locale, it may answer me back with <code>en</code> or another fallback locale. I couldn't find it neither inside the results nor the response headers.</p>

<p>I need this to cache and show the users the right data. My website's fallback language is <code>en</code> for example, but the API might give me <code>de</code> for example.</p>

<p>Thanks.</p>

<hr>

<p><strong>Edit</strong> Here's an example of what I try to tell;</p>

<p>URL:</p>

<pre><code>https://api.foursquare.com/v2/venues/4adcda50f964a520354121e3
?client_id=[client_id]&amp;client_secret=[client_secret]&amp;v=20161115&amp;locale=tr
</code></pre>

<p>Headers:</p>

<pre><code>array (
   'Accept-Language' =&gt; 'tr',
   'Accept' =&gt; 'application/json'
)
</code></pre>

<p>Result (Cropped some unrelated items):</p>

<pre><code>{
  "meta": {
    "code": 200,
    "requestId": "582bfe9e1ed21964a18d3aab"
  },
  "response": {
    "venue": {
      "id": "4adcda50f964a520354121e3",
      "name": "La Pedrera (Casa Milà) (Casa Milà 'La Pedrera')",
      "contact": {
        "phone": "+34902202138",
        "formattedPhone": "+34 902 20 21 38",
        "twitter": "catfundacio",
        "facebook": "429182007214758",
        "facebookUsername": "lapedrera.barcelona",
        "facebookName": "La Pedrera-Casa Milà"
      },
      "location": {
        "address": "Pg. Gràcia, 92",
        "crossStreet": "Carrer Provença",
        "lat": 41.39509128050475,
        "lng": 2.1618343621091296,
        "postalCode": "08008",
        "cc": "ES",
        "city": "Barselona",
        "state": "Cataluña",
        "country": "İspanya",
        "formattedAddress": [
          "Pg. Gràcia, 92 (Carrer Provença)",
          "08008 Barselona Catalonia",
          "İspanya"
        ]
      },
      "canonicalUrl": "https:\/\/foursquare.com\/v\/la-pedrera-casa-mil%C3%A0\/4adcda50f964a520354121e3",
      "categories": [
        {
          "id": "4bf58dd8d48988d12d941735",
          "name": "Anıt \/ Abide",
          "pluralName": "Anıtlar \/ Abideler",
          "shortName": "Abide",
          "icon": {
            "prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/government_monument_",
            "suffix": ".png"
          },
          "primary": true
        },
        {
          "id": "4bf58dd8d48988d130941735",
          "name": "Bina",
          "pluralName": "Binalar",
          "shortName": "Bina",
          "icon": {
            "prefix": "https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/default_",
            "suffix": ".png"
          }
        }
      ],      
      "description": "La Pedrera (Casa Milà) és un edifici construït per Antoni Gaudí i declarat Patrimoni de la Humanitat. Actualment és la seu de la Fundació Catalunya-La Pedrera.",
      "storeId": "",
      "tags": [
        "gallery",
        "gaudi",
        "modernisme",
        "museum",
        "photobooth",
        "sicted"
      ],
      "shortUrl": "http:\/\/4sq.com\/72NCMi",
      "timeZone": "Europe\/Madrid",
      "hours": {
        "status": "09:00'e kadar kapalı",
        "isOpen": false,
        "isLocalHoliday": false,
        "timeframes": [
          {
            "days": "Pzt\u2013Paz",
            "includesToday": true,
            "open": [
              {
                "renderedTime": "09:00\u201321:00"
              }
            ],
            "segments": [

            ]
          }
        ]
      },
      "attributes": {
        "groups": [
          {
            "type": "wifi",
            "name": "Kablosuz Bağlantı",
            "summary": "Ücretsiz Wi-Fi",
            "count": 1,
            "items": [
              {
                "displayName": "Kablosuz Bağlantı",
                "displayValue": "Ücretsiz"
              }
            ]
          }
        ]
      },
      "bestPhoto": {
        "id": "55672a92498ec352981dd144",
        "createdAt": 1432824466,
        "source": {
          "name": "Foursquare Web",
          "url": "https:\/\/foursquare.com"
        },
        "prefix": "https:\/\/irs2.4sqi.net\/img\/general\/",
        "suffix": "\/39082263_M0PK-NTv3A-0tI4j_aEIp5k6BEkliQTkMXS9TIPg_NQ.jpg",
        "width": 620,
        "height": 478,
        "visibility": "public"
      }
    }
  }
}
</code></pre>

<p>The <code>addresses, categories, some of the names, timeframes, attributes</code> sections are in fact <strong>Turkish</strong>, but the description and the most of the names are in fallback/local language which is <strong>Spanish</strong> in this case. </p>