Home Work
SaaS developmentAI developmentAPI developmentMobile app developmentGoogle Ads managementHeadless ShopifyLaravel developmentNext.js developmentReact developmentTypeScript engineeringUI/UX designSEO & AEOEcommerce development
AI solutionsB2B platformsE-commerceHospitalityLead generationLogisticsEducationProcess automationSaaS platformsStartup MVPReal estateHealthcare
LegalHealthcareReal estateFinanceHospitality
The HagueRotterdamAmsterdamUtrechtEindhovenAlmereBredaArnhemNijmegenTilburgEnschedeGroningenLeidenDelftZoetermeerDen Bosch
Studio
AboutProcessLabBlogContact

Taalkeuze NL / EN zonder vlaggen New

Language switch for a bilingual site, without flags: a flag stands for a country, not a language. In the header a button with the language code opens a list where each language is written in itself (Nederlands, English) with lang and hreflang attributes, and the same choice sits at the bottom as plain text links. Choosing swaps the content with a short transition, sets lang on the page and is remembered. Arrows and Esc work in the list. In production you link to the actual translated page instead of swapping text.

Elke ochtend vers brood in Haarlem

Open vanaf 7:00 aan de Botermarkt. Bestel voor 20:00, dan ligt het morgen klaar.

Taal: Nederlands English

How to use it

  1. Paste the HTML where the navigation & menus should appear.
  2. Add the CSS to your stylesheet. All classes are prefixed, so nothing clashes with your own styles.
  3. Add the JavaScript and call init() with the element that contains the HTML.
<!-- Taalkeuze NL / EN zonder vlaggen · NedDev · eigen werk. -->
<div class="jouw-container">
<div class="tkn" lang="nl">
<header class="tkn__head">
<a class="tkn__logo" href="#tkn">Bakkerij Verbeek</a>
<nav class="tkn__nav" aria-label="Hoofdmenu"><a href="#tkn-1" data-nl="Assortiment" data-en="Our bread">Assortiment</a><a href="#tkn-2" data-nl="Bestellen" data-en="Order">Bestellen</a><a href="#tkn-3" data-nl="Contact" data-en="Contact">Contact</a></nav>
<div class="tkn__lang">
<button class="tkn__btn" type="button" aria-expanded="false" aria-controls="tkn-list" aria-label="Taal: Nederlands. Kies een andere taal"><svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6"/><path d="M2 8h12M8 2c1.8 1.8 2.6 3.8 2.6 6S9.8 12.2 8 14M8 2C6.2 3.8 5.4 5.8 5.4 8s.8 4.2 2.6 6"/></svg><span class="tkn__code">NL</span><svg class="tkn__chev" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6l4 4 4-4"/></svg></button>
<ul class="tkn__list" id="tkn-list" hidden>
<li><a class="tkn__opt" href="?taal=nl" hreflang="nl" lang="nl" data-l="nl" aria-current="true"><span>Nederlands</span><span class="tkn__c">NL</span></a></li>
<li><a class="tkn__opt" href="?taal=en" hreflang="en" lang="en" data-l="en"><span>English</span><span class="tkn__c">EN</span></a></li>
</ul>
</div>
</header>
<div class="tkn__body">
<h3 class="tkn__h" data-nl="Elke ochtend vers brood in Haarlem" data-en="Fresh bread in Haarlem every morning">Elke ochtend vers brood in Haarlem</h3>
<p class="tkn__p" data-nl="Open vanaf 7:00 aan de Botermarkt. Bestel voor 20:00, dan ligt het morgen klaar." data-en="Open from 7:00 at the Botermarkt. Order before 20:00 and it is ready tomorrow.">Open vanaf 7:00 aan de Botermarkt. Bestel voor 20:00, dan ligt het morgen klaar.</p>
</div>
<p class="tkn__foot"><span data-nl="Taal:" data-en="Language:">Taal:</span> <a class="tkn__fl" href="?taal=nl" hreflang="nl" lang="nl" data-l="nl" aria-current="true">Nederlands</a> <a class="tkn__fl" href="?taal=en" hreflang="en" lang="en" data-l="en">English</a></p>
<p class="tkn__sr" aria-live="polite"></p>
</div>
</div>

More navigation & menus

Seen something you like?

Add it to your selection and send it over. We build your site around it, in your brand.

Get in touch →