Answers.Body: <p>If you don't want to translate the sections URLs and the entries slugs then there's a very easy way to do a language switch. Just append <a href="http://buildwithcraft.com/docs/templating/craft.request#path" rel="nofollow"><code>craft.request.path()</code></a> to your localized base URL.</p>
  
  <pre><code>&lt;a href="{{ 'http://craft.dev/' ~ craft.request.path() }}" class="nav-link{{ craft.locale == 'pt_BR' ? ' current' }}"&gt;BRA&lt;/a&gt;
  &lt;a href="{{ 'http://craft.dev/de/'  ~ craft.request.path() }}" class="nav-link{{ craft.locale == 'de' ? ' current' }}"&gt;GER&lt;/a&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-09T18:34:02.673Z
Answers.LastActivityDate: 2014-07-10T01:38:40.760Z
Answers.LastEditDate: 2014-07-10T01:38:40.760Z
Answers.UserDisplayName: carlcs
Answers.Body: <p>This Google+ thread may help: <a href="https://plus.google.com/116942350387086245334/posts/TBtR3XwuZGx">https://plus.google.com/116942350387086245334/posts/TBtR3XwuZGx</a></p>
  
  <p>Current options as per above thread:</p>
  
  <ul>
  <li>Create a <em>Single</em> for the News index template</li>
  <li>Create a <em>localized template</em> as per <a href="http://buildwithcraft.com/docs/templating-overview#template-localization">http://buildwithcraft.com/docs/templating-overview#template-localization</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-09T18:29:11.170Z
Answers.Text: It’s a shame that something as standard as a blog needs a workaround like these. Thanks Andrea.
Answers.UserDisplayName: simonsweeney
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-09T18:47:20.183Z
Answers.Text: @simon it's not a workaround but simply the difference between entry pages, which get the Url from section url and slug settings, and unrelated pages as your index.html, that Craft doesn't know about.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-09T18:58:11.770Z
Answers.Text: Other then to make the index a *Single* section, I suggest to also consider designing a *Structure* section, with all your single pages and your channel index page becoming entries of that section (with individual entry types if needed). Then you can translate the slugs of all your pages with ease and your language switch works as it is.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-09T12:27:33.750Z
Answers.LastActivityDate: 2014-07-09T12:54:40.180Z
Answers.LastEditDate: 2014-07-09T12:54:40.180Z
Answers.UserDisplayName: Andrea DeMers
Body: <p>So I have successfully set up two locales on my site, with a button to switch between, this works fine for all the sections that have the langauges set, but I cannot seem to get it to work for the news index template, my news feed. An individual entry will work fine, but the collated entries don’t. Is there a snippet I need to place at the top of the News index template to define what locale it should contain?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-09T19:01:36.003Z
Comments.Text: Is [this](http://craftcms.stackexchange.com/a/46/125) the language switch you are using? Do you want to translate URLs and slugs?
Comments.UserDisplayName: carlcs
Tags: <localization>
Title: Locale Switch not Affecting News Index Template
ThreadText: # Locale Switch not Affecting News Index Template
  
  (Asked by: username_0 on 2014-07-09)
  
  So I have successfully set up two locales on my site, with a button to switch between, this works fine for all the sections that have the langauges set, but I cannot seem to get it to work for the news index template, my news feed. An individual entry will work fine, but the collated entries don’t. Is there a snippet I need to place at the top of the News index template to define what locale it should contain?
  
  **Tags:** localization
  
  > **Comments:**
  > **username_1**: Is [this](http://craftcms.stackexchange.com/a/46/125) the language switch you are using? Do you want to translate URLs and slugs?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-07-09. Score: 10 | Accepted answer
  
  This Google+ thread may help: <https://plus.google.com/116942350387086245334/posts/TBtR3XwuZGx>
  
  Current options as per above thread:
  
  * Create a *Single* for the News index template
  * Create a *localized template* as per <http://buildwithcraft.com/docs/templating-overview#template-localization>
  
  > **Comments:**
  > **username_0**: It’s a shame that something as standard as a blog needs a workaround like these. Thanks username_2.  
  > **username_1**: @simon it's not a workaround but simply the difference between entry pages, which get the Url from section url and slug settings, and unrelated pages as your index.html, that Craft doesn't know about.  
  > **username_1**: Other then to make the index a *Single* section, I suggest to also consider designing a *Structure* section, with all your single pages and your channel index page becoming entries of that section (with individual entry types if needed). Then you can translate the slugs of all your pages with ease and your language switch works as it is.  
  
  ---
  
  ### Answer by username_1 on 2014-07-09. Score: 4
  
  If you don't want to translate the sections URLs and the entries slugs then there's a very easy way to do a language switch. Just append [`craft.request.path()`](http://buildwithcraft.com/docs/templating/craft.request#path) to your localized base URL.
  
  ```
  <a href="{{ 'http://craft.dev/' ~ craft.request.path() }}" class="nav-link{{ craft.locale == 'pt_BR' ? ' current' }}">BRA</a>
  <a href="{{ 'http://craft.dev/de/'  ~ craft.request.path() }}" class="nav-link{{ craft.locale == 'de' ? ' current' }}">GER</a>
  
  ```
  
  
  ---
  
  