# Change LANG verion on current page

**URL:** <https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817>\
**Category:** support\
**Created:** [March 16, 2017, 1:22pm UTC](https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817 "2017-03-16T13:22:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![igramnet](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/igramnet/32/2715_2.png) [@igramnet](https://discourse.gohugo.io/u/igramnet)\
**Post date:** [March 16, 2017, 1:22pm UTC](https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817/1 "2017-03-16T13:22:13Z")

</div>

Hello. I need help.

I have the pages

[https://site.ru/ru/cdn/](https://site.ru/ru/cdn/) - RU verision  
[https://site.ru/cdn/](https://site.ru/cdn/) - EN version

I want to create universal lang switch. I want that when I click to EN link, watche ENG version page. And if I click to RU link - I watche the RUS version page.

---

<div class="post-metadata">

**Author:** ![digitalcraftsman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/digitalcraftsman/32/4142_2.png) [@digitalcraftsman](https://discourse.gohugo.io/u/digitalcraftsman)\
**Post date:** [March 16, 2017, 2:24pm UTC](https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817/2 "2017-03-16T14:24:31Z")

</div>

Have a look at the [example](https://gohugo.io/content/multilingual/#link-to-translated-content) in the docs.

---

<div class="post-metadata">

**Author:** ![igramnet](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/igramnet/32/2715_2.png) [@igramnet](https://discourse.gohugo.io/u/igramnet)\
**Post date:** [March 16, 2017, 2:46pm UTC](https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817/3 "2017-03-16T14:46:06Z")

</div>

This decision does not suit me. I need to always show language links. (See the image by reference)

[Example](http://pixs.ru/showimage/e06c028d20_6714478_25521895.png)

I have code:

```
{{ range .Translations }}
		{{ if eq .Lang "en" }}
					<a href="{{ .URL }}" class="active_l">{{ T "lang_en" }}</a>
					<a href="{{ .Permalink }}">{{ T "lang_ru" }}</a>
		{{ else }}
					<a href="{{ .Permalink }}">{{ T "lang_en" }}</a>
					<a href="{{ .URL }}" class="active_l">{{ T "lang_ru" }}</a>
		{{ end }}
{{ end}}	

```

But now Permalink and URL refer to the same address.  
I need them to refer to their version

---

<div class="post-metadata">

**Author:** ![igramnet](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/igramnet/32/2715_2.png) [@igramnet](https://discourse.gohugo.io/u/igramnet)\
**Post date:** [March 17, 2017, 7:19am UTC](https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817/4 "2017-03-17T07:19:38Z")

</div>

I decided this way

```
{{ if .IsTranslated }}
	{{ if eq .Lang "en" }}
		<a href="{{ .URL }}" class="active_l">{{ T "lang_en" }}</a>
	{{ end }}
    {{ range .Translations }}
	{{ if eq .Lang "en" }}
		<a href="{{ .URL }}">{{ T "lang_en" }}</a>
	{{ else }}
		<a href="{{ .URL }}">{{ T "lang_ru" }}</a>
	{{ end }}
    {{ end}}
	{{ if eq .Lang "ru" }}
		<a href="{{ .URL }}" class="active_l">{{ T "lang_ru" }}</a>
	{{ end }}
{{ end }}
```

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [March 17, 2017, 9:47am UTC](https://discourse.gohugo.io/t/change-lang-verion-on-current-page/5817/5 "2017-03-17T09:47:00Z")

</div>

You can also use `.AllTranslations` which will include your current language.
