{if $view_common_languages|@count>1}
    {if $view_common_languages|@count eq 2}
        <span class="languageList xs-list lang-option">
            {foreach from=$view_common_languages item="resCommonLanguages" key="key"}
                <span class="lang-optionlist lang-optionlist-btn lang-btn font-weight-bold cursor-pointer  {$resCommonLanguages.languageCode}" id="common_language_{$resCommonLanguages.languageID}_{$resCommonLanguages.LanguageLCIDstring}"> 
                    {$resCommonLanguages.languageName} 
                </span>
            {/foreach}
        </span>
    {else}
        <div class="dropdown lang-option mt-lg-1 col">
             <a class="languagebox_head" data-toggle="dropdown" id="{$AjaxCurrLanguage}" title="{$view_common_languageName}">
                {$view_common_languageName}
          </a>
          <ul class="dropdown-menu p-lg-2 languageList">
               {foreach from=$view_common_languages item="resCommonLanguages" key="key"}
      {if $currentLanguageID neq $resCommonLanguages.languageID}
       <li class="pb-1"> 
          <a href="javascript:void(0);" class="lang-optionlist" id="common_language_{$resCommonLanguages.languageID}_{$resCommonLanguages.LanguageLCIDstring}"> <img src="{$view_public_path}/uploads/languages/{$resCommonLanguages.languageImage|escape}" width="22" height="16" alt="{$resCommonLanguages.languageName}" /> {$resCommonLanguages.languageName}</a></li>
              {/if}
      {/foreach}
                        </ul>
          </div>
    {/if}
{*
<!--
*****Included in common head application js *****
{html->script_group_start name="{$compiled_js_path}/commonlanguageoptions.js"}
   {html->script src="{$common_frontend_js}/language.plugin.js"}
 {html->script_group_end} 
-->
*}
{/if}