<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>

CC BY-SA 3.0
2014-07-09T18:34:02.673Z
2014-07-10T01:38:40.760Z
2014-07-10T01:38:40.760Z
carlcs
<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>

CC BY-SA 3.0
2014-07-09T18:29:11.170Z
It’s a shame that something as standard as a blog needs a workaround like these. Thanks Andrea.
simonsweeney
CC BY-SA 3.0
2014-07-09T18:47:20.183Z
@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.
carlcs
CC BY-SA 3.0
2014-07-09T18:58:11.770Z
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.
carlcs
CC BY-SA 3.0
2014-07-09T12:27:33.750Z
2014-07-09T12:54:40.180Z
2014-07-09T12:54:40.180Z
Andrea DeMers
<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>

CC BY-SA 3.0
2014-07-09T19:01:36.003Z
Is [this](http://craftcms.stackexchange.com/a/46/125) the language switch you are using? Do you want to translate URLs and slugs?
carlcs
<localization>
Locale Switch not Affecting News Index Template
# 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 Andrea.  
> **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() to your localized base URL.
BRA
GER


---

