Answers.Body: <p>It was pretty easy :)</p>
  
  <pre><code>{% header "Content-Type: application/json" %}
  {% set basics = craft.entries.section('basics').locale('en').find('') %}
  {{ basics | json_expand | raw  }}
  </code></pre>
  
  <p>all it needed was: <code>.locale('en')</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-07T15:39:06.647Z
Answers.LastActivityDate: 2015-12-07T18:52:32.473Z
Answers.LastEditDate: 2015-12-07T18:52:32.473Z
Answers.UserDisplayName: goran
Body: <p>My index.html endpoint in the templates folder looks like this:</p>
  
  <pre><code>    {% header "Content-Type: application/json" %}
      {% set basics = craft.entries.section('basics').find('') %}
      {{ basics | json_expand | raw  }}
  </code></pre>
  
  <p>I did enable the fields and put some localized strings inside,
  still json returns this:</p>
  
  <pre><code>[
   {
  "id": "261",
  "enabled": "1",
  "archived": "0",
  "locale": "de",
  "localeEnabled": "1",
  "slug": "wimpern-richtig-tuschen",
  "uri": null,
  "dateCreated": {
    "date": "2015-11-26 12:08:01",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "dateUpdated": {
    "date": "2015-12-07 15:03:51",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "root": null,
  "lft": null,
  "rgt": null,
  "level": null,
  "sectionId": "7",
  "typeId": "9",
  "authorId": "153",
  "postDate": {
    "date": "2015-11-26 12:08:00",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "expiryDate": null,
  "parentId": null,
  "revisionNotes": null,
  "title": "Wimpern richtig tuschen",
  "basics_text": "Wimpern richtig tuschen", (etc...)
  </code></pre>
  
  <p>is there a way to make an endpoint just for the english version, like basics_en ? Is there even any way to get the localized data using this method? The CMS is for a mobile-app, so i just need the raw data from the endpoint.</p>
  
Tags: <localization><json><plugin-jsonexpand>
Title: How can i get API-Response that includes localized data using json_expand?
ThreadText: # How can i get API-Response that includes localized data using json_expand?
  
  (Asked by: username_0 on 2015-12-07)
  
  My index.html endpoint in the templates folder looks like this:
  
  ```
      {% header "Content-Type: application/json" %}
      {% set basics = craft.entries.section('basics').find('') %}
      {{ basics | json_expand | raw  }}
  
  ```
  
  I did enable the fields and put some localized strings inside,
  still json returns this:
  
  ```
  [
   {
  "id": "261",
  "enabled": "1",
  "archived": "0",
  "locale": "de",
  "localeEnabled": "1",
  "slug": "wimpern-richtig-tuschen",
  "uri": null,
  "dateCreated": {
    "date": "2015-11-26 12:08:01",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "dateUpdated": {
    "date": "2015-12-07 15:03:51",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "root": null,
  "lft": null,
  "rgt": null,
  "level": null,
  "sectionId": "7",
  "typeId": "9",
  "authorId": "153",
  "postDate": {
    "date": "2015-11-26 12:08:00",
    "timezone_type": 3,
    "timezone": "UTC"
  },
  "expiryDate": null,
  "parentId": null,
  "revisionNotes": null,
  "title": "Wimpern richtig tuschen",
  "basics_text": "Wimpern richtig tuschen", (etc...)
  
  ```
  
  is there a way to make an endpoint just for the english version, like basics\_en ? Is there even any way to get the localized data using this method? The CMS is for a mobile-app, so i just need the raw data from the endpoint.
  
  **Tags:** localization, json, plugin-jsonexpand
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-12-07. Score: 1 | Accepted answer
  
  It was pretty easy :)
  
  ```
  {% header "Content-Type: application/json" %}
  {% set basics = craft.entries.section('basics').locale('en').find('') %}
  {{ basics | json_expand | raw  }}
  
  ```
  
  all it needed was: `.locale('en')`
  
  
  ---
  
  