Language Navigation TagHelper

This page will demonstrate different samples for Langauge Navigation TagHelper settings.

Related article : Langauge Naviagtion for NetCore
Github repository : LazZiya.TagHelpers

Installation :

install from nuget package manager:

    PM> Install-Package LazZiya.TagHelpers

Add tag helpers to _ViewImports.cshtml as below :


    @addTagHelper *, LazZiya.TagHelpers

Samples

Minimum setup

Notice: LazZiya.TagHelpers versions earlier than v3.0.1 rquires ViewContext parameter to be passed.
Starting from v3.0.1 ViewContext is not required any more.

                
                    <!-- LazZiya.TagHelpers >= v3.0.1 -->
                    <language-nav></language-nav>

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

Result :


Manually define supported cultures


    <language-nav view-context="ViewContext"
                  supported-cultures="en,ar-SY,tr">
    </language-nav>

Result :


Render mode


    <language-nav view-context="ViewContext"
                  render-mode="Classic">
    </language-nav>

Result :


Language label (display text)


    <language-nav view-context="ViewContext"
                   language-label="NativeName">
    </language-nav>

Result :