Thank you bep.
I know about .Site.Language.Lang but I need more custom params
This is the whole config.toml
baseurl = “https://wwww”
theme = “custom”
languageCode = “en-us”
disqusShortname = “”
paginate = 10
[params]
copyright = “Copyright © 2015 - 2017”
date_format = “2006-01-02”
logo = “img/Logo_Img.png”
sponsor_logo = “img/erasmus_plus_logo.png”
[params.carousel]
enable = true
defaultContentLanguage = “en”
[languages]
[languages.en]
weight = 0
[languages.en.params]
languagecode = “en”
[[languages.en.menu.main]]
name = “Project”
url = “/project/”
weight = 0
[[languages.en.menu.main]]
name = “Products”
url = “/products/”
weight = 1
[[languages.en.menu.main]]
name = “Partners”
url = “/partner/”
weight = 2
[[languages.en.menu.main]]
name = “News”
url = “/news/”
weight = 3
[[languages.en.menu.main]]
name = “Contact”
url = “/contact/”
weight = 4
[[languages.en.menu.language]]
name = “German”
url = “/de”
pre = " "
weight = 0
[[languages.en.menu.language]]
name = “Greek”
url = “/el”
pre = " "
weight = 1
[[languages.en.menu.language]]
name = “Dutch”
url = “/nl”
pre = " "
weight = 2
[[languages.en.menu.language]]
name = “Slovak”
url = “/sk”
pre = " "
weight = 3
[[languages.en.menu.language]]
name = “Slovenian”
url = “/sl”
pre = " "
weight = 4
[[languages.en.menu.language]]
name = “Spannish”
url = “/es”
pre = " "
weight = 5
And in my template I do this
<div class="pull-right lang-selector">
<div class="dropdown">
<div class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class='flag-icon flag-icon-{{ .Site.Language.Params.langcode }}'></span>
<span class="caret"></span>
</div>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
{{ range .Site.Menus.language }}
<li><a href="{{ .URL }}">{{ .Pre }}{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
</div>
The .Site.Language.Params.langcode in not working in this case.