Installation :

install from nuget package manager:

    PM> Install-Package LazZiya.TagHelpers

Add tag helpers to _ViewImports.cshtml as below :

    @addTagHelper *, LazZiya.TagHelpers

Minimum setup

<!-- LazZiya.TagHelpers >= v3.0.1 -->

<!-- LazZiya.TagHelpers <= v3.0.0 -->
<language-nav view-context="ViewContext"></language-nav>

Result :

Manually define supported cultures

<language-nav supported-cultures="en,ar-SY,tr">

Result :

Render mode

<language-nav render-mode="Classic">

Result :

Language label (display text)

Show flags

To show country flags the culture must contain country code e.g. "tr-TR", "en-US", "ar-sy", ...etc.

Showing flags requires a reference to flag-icon-css and flag attribute:

<link rel="stylesheet" href="" />

<language-nav flags="true">

Result :