Answers.Body: <p>Craft always outputs entries in one locale only. If you really want to list all entries in all of their <strong>enabled locales</strong> you would need to explicitly query for them using the <code>locale</code> parameter and then merge the results.</p>
  
  <p>What probably confuses you is that Craft automatically clones an entry on the first save to all other locales. Try to edit an entry / <strong>disable it for one locale only</strong> and see the differences on you index pages!</p>
  
  <p>If you really don't get the locale specific content for your different URL formats</p>
  
  <p><code>example.com</code><br>
  <code>example.com/locale1</code></p>
  
  <p>there probably goes something wrong with your setup. The first thing I would check is the <code>index.php</code> files (→ Localization guide – <a href="http://buildwithcraft.com/docs/localization-guide#step-5-set-up-the-files" rel="nofollow">Step 5: Set up the files</a>)!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-17T17:32:48.630Z
Answers.Text: The localization is set correctly, only output makes a mess with it. Yes, you're right. Craft always outputs entries in one locale only. I made a 'check' by outputting { entry.locale } in entry, and when I was at "locale1", all entries were marked with "locale1", even those, that was not published for "locale1". I want to display only those, that are published for "locale1". I'll try to find a solution, and if I succeed,I publish it.
Answers.UserDisplayName: Dominik Krulak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-17T17:39:04.367Z
Answers.Text: Entries are published on all locales by default, @Dominic. You have to disable it for select locales in the CP manually!
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-17T17:56:49.203Z
Answers.Text: If I do so, than only chosen locale's user group can publish to that section. Because, Local1UserGroup have access to Local1. I want all Locales and all Locale user's groups have access to a section. Only with that difference, that entries get published to selected Locale by selected user's group. It's confusing.
Answers.UserDisplayName: Dominik Krulak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-16T21:15:04.137Z
Answers.LastActivityDate: 2015-02-23T12:57:14.903Z
Answers.LastEditDate: 2015-02-23T12:57:14.903Z
Answers.UserDisplayName: carlcs
Body: <p>The documentation doesn't say much about it, only <a href="http://buildwithcraft.com/help/locale-data-from-templates" rel="nofollow">How to access it</a>.</p>
  
  <p><strong>What I'm trying to achieve here?</strong></p>
  
  <p>Display entries only related to a locale.</p>
  
  <hr>
  
  <p><strong>I'll present it you with an example.</strong></p>
  
  <p>There are 3 targeted locales enabled in 3 sections. 1 entry in each section, created by 3 local users. So math says, that one locale has 3 entries, where the whole example.com has 9 entries together.</p>
  
  <hr>
  
  <p>So, When I try to index entries on selected section I get that:</p>
  
  <ul>
  <li>example.com/section1/ -> all entries from all locales are outputted, because entries are targeted in all locales of a section.</li>
  <li>example.com/locale1/section1/ -> the same situation as with example.com/section1/, except with two differences, that entries's URL has /locale1/section1/{slug} and the locale is matched with active one.</li>
  </ul>
  
  <p>I've looked into database, and all entries published are linked with each locale, even when Local User1 published to Local1 only. If that is gonna work, I don't know, if that will have any impact on storage efficiency.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-17T12:49:14.653Z
Comments.Text: I probably totally misunderstood your question, right? What do you mean with "selected locale", Dominic?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-17T17:25:31.660Z
Comments.Text: Thank you Carl and Sorry for late respond. Usually, I can respond only in evenings of UTC time. By "selected locale" is meant - selected locale for entries in section/s in template. Or I could say, if "Locale1" is active, display entries relative for "Locale1".
Comments.UserDisplayName: Dominik Krulak
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-17T17:30:36.600Z
Comments.Text: You mean active / selected via the lightswitch button next to the locale on the Entry Edit page. Then I probably didn't get you question as wrong as I thought...
Comments.UserDisplayName: carlcs
Tags: <entries><localization><sections>
Title: How to output entries related to a locale, IF a section is targeted to all locales?
ThreadText: # How to output entries related to a locale, IF a section is targeted to all locales?
  
  (Asked by: username_0 on 2015-02-16)
  
  The documentation doesn't say much about it, only [How to access it](http://buildwithcraft.com/help/locale-data-from-templates).
  
  **What I'm trying to achieve here?**
  
  Display entries only related to a locale.
  
  ---
  
  **I'll present it you with an example.**
  
  There are 3 targeted locales enabled in 3 sections. 1 entry in each section, created by 3 local users. So math says, that one locale has 3 entries, where the whole example.com has 9 entries together.
  
  ---
  
  So, When I try to index entries on selected section I get that:
  
  * example.com/section1/ -> all entries from all locales are outputted, because entries are targeted in all locales of a section.
  * example.com/locale1/section1/ -> the same situation as with example.com/section1/, except with two differences, that entries's URL has /locale1/section1/{slug} and the locale is matched with active one.
  
  I've looked into database, and all entries published are linked with each locale, even when Local User1 published to Local1 only. If that is gonna work, I don't know, if that will have any impact on storage efficiency.
  
  **Tags:** entries, localization, sections
  
  > **Comments:**
  > **username_1**: I probably totally misunderstood your question, right? What do you mean with "selected locale", Dominic?  
  > **username_0**: Thank you Carl and Sorry for late respond. Usually, I can respond only in evenings of UTC time. By "selected locale" is meant - selected locale for entries in section/s in template. Or I could say, if "Locale1" is active, display entries relative for "Locale1".  
  > **username_1**: You mean active / selected via the lightswitch button next to the locale on the Entry Edit page. Then I probably didn't get you question as wrong as I thought...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-02-16. Score: 2 | Accepted answer
  
  Craft always outputs entries in one locale only. If you really want to list all entries in all of their **enabled locales** you would need to explicitly query for them using the `locale` parameter and then merge the results.
  
  What probably confuses you is that Craft automatically clones an entry on the first save to all other locales. Try to edit an entry / **disable it for one locale only** and see the differences on you index pages!
  
  If you really don't get the locale specific content for your different URL formats
  
  `example.com`  
  `example.com/locale1`
  
  there probably goes something wrong with your setup. The first thing I would check is the `index.php` files (→ Localization guide – [Step 5: Set up the files](http://buildwithcraft.com/docs/localization-guide#step-5-set-up-the-files))!
  
  > **Comments:**
  > **username_0**: The localization is set correctly, only output makes a mess with it. Yes, you're right. Craft always outputs entries in one locale only. I made a 'check' by outputting { entry.locale } in entry, and when I was at "locale1", all entries were marked with "locale1", even those, that was not published for "locale1". I want to display only those, that are published for "locale1". I'll try to find a solution, and if I succeed,I publish it.  
  > **username_1**: Entries are published on all locales by default, @Dominic. You have to disable it for select locales in the CP manually!  
  > **username_0**: If I do so, than only chosen locale's user group can publish to that section. Because, Local1UserGroup have access to Local1. I want all Locales and all Locale user's groups have access to a section. Only with that difference, that entries get published to selected Locale by selected user's group. It's confusing.  
  
  ---
  
  