Answers.Body: <p>Got it...</p>
  
  <pre><code>{% set crawledEntries = craft.entries({
      relatedTo: { sourceElement: crawlSites, field: "entryCrawler" },
      order: "sortOrder"
  }) %}
  
  {% set otherLocales = craft.i18n.getSiteLocaleIds()|without(craft.locale) %}
  
  {% for entry in crawledEntries %}
      Disallow: /{{ entry.uri }}
      {% for locale in otherLocales %}
          {% set entryL = craft.entries.id(entry.id).locale(locale).first() %}
  
          {% if entryL %}
              Disallow: /{{locale}}/{{ entryL.uri }}
          {% endif %}
      {% endfor %}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-22T13:41:45.883Z
Answers.LastActivityDate: 2017-02-22T17:31:11.643Z
Answers.LastEditDate: 2017-02-22T17:31:11.643Z
Answers.UserDisplayName: Mvrcel Boer
Body: <p>For the <code>robot.txt</code> file, I want to get every URI from the entries for every language. Right now it just gets the URI from one language.</p>
  
  <pre><code>{% set crawledEntries = craft.entries({
      relatedTo: { sourceElement: crawlSites, field: "entryCrawler" },
      order: "sortOrder"
  }) %}
  
  {% for entry in crawledEntries %}
      Disallow: /{{ entry.uri }}
  {% endfor %}
  </code></pre>
  
  <p>This now loops just through one locale.</p>
  
Tags: <url><language>
Title: Get every slug from entry for each language
ThreadText: # Get every slug from entry for each language
  
  (Asked by: username_0 on 2017-02-22)
  
  For the `robot.txt` file, I want to get every URI from the entries for every language. Right now it just gets the URI from one language.
  
  ```
  {% set crawledEntries = craft.entries({
      relatedTo: { sourceElement: crawlSites, field: "entryCrawler" },
      order: "sortOrder"
  }) %}
  
  {% for entry in crawledEntries %}
      Disallow: /{{ entry.uri }}
  {% endfor %}
  
  ```
  
  This now loops just through one locale.
  
  **Tags:** url, language
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-02-22. Score: 1
  
  Got it...
  
  ```
  {% set crawledEntries = craft.entries({
      relatedTo: { sourceElement: crawlSites, field: "entryCrawler" },
      order: "sortOrder"
  }) %}
  
  {% set otherLocales = craft.i18n.getSiteLocaleIds()|without(craft.locale) %}
  
  {% for entry in crawledEntries %}
      Disallow: /{{ entry.uri }}
      {% for locale in otherLocales %}
          {% set entryL = craft.entries.id(entry.id).locale(locale).first() %}
  
          {% if entryL %}
              Disallow: /{{locale}}/{{ entryL.uri }}
          {% endif %}
      {% endfor %}
  {% endfor %}
  
  ```
  
  
  ---
  
  