Skip to main content
Lara Simpson
Community Ninja
Asked a question 7 months ago

How do I add a language picking option to the home page navbar? I am an enterprise client and have access to the multi-lingual feature.

Where am I?

In Tribe you can ask and answer questions and share your experience with others!

Below is an example code that adds two languages to the top navbar on the home page (English and French). You can replace the languages in the code to show any other language that you want. 
The codes should be inserted to Admin Panel> Theme> Advanced Settings> <body> tag

<div class="ui compact menu"> 
	<div class="ui simple dropdown item"> 
	Language Picker 
		<i class="dropdown icon"></i> 
		<div class="menu">
			<a class="item" href="?locale=en">English</a>
			<a class="item" href="?locale=fr">French</a>
		</div> 
	</div> 
</div>

However, the code above does not "save" the language for the user's account. If you want it to be saved for the user account, you need to use this code: 

<div class="ui compact menu">
<div class="ui simple dropdown item">
Language Picker
 <i class="dropdown icon"></i>
 <div class="menu">
  <a class="item" href="?setLocale=en">English</a>
  <a class="item" href="?setLocale=fr">French</a>
 </div>
</div>
</div>