Hi guys,
I need to make a custom hyperlink in the navbar switch its name translation and its link along with the survey's language.
Currently, I have it similar to this in
nav_bar.twig:
Code:
<div id="{{ aSurveyInfo.id.navbar }}" class="{{ aSurveyInfo.class.navbarcollapse }}" {{ aSurveyInfo.attr.navbarcollapse }} >
<ul class="{{ aSurveyInfo.class.navbarlink }} navbar-right" {{ aSurveyInfo.attr.navbarlink }}>
{{ include('./subviews/navigation/save_links.twig') }}
{#{{ include('./subviews/navigation/clearall_links.twig') }}#}
{{ include('./subviews/navigation/question_index_menu.twig') }}
{{ include('./subviews/navigation/language_changer_top_menu.twig') }}
<li class="nav-item">
<a class="nav-link" href="https://mywebsite.com" target="_blank">My website</a>
</li>
</ul>
</div>
I've added the link at the end. But when I switch between the languages I need to somehow add that it switches to another link along with the interface like in the above twig files.
Perhaps, it can be done like with the logo switch?
Code:
{# Logo option #}
{% if( aSurveyInfo.options.brandlogo == "on") %}
<div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} >
{{ image('./files/logo-eng.png', 'alt-text for my file', {"class": "logo-en"}) }}
{{ image('./files/logo-fr.png', 'alt-text for my file', {"class": "logo-fr"}) }}
</div>
{% else %}
<div class="{{ aSurveyInfo.class.navbarbrand }}" {{ aSurveyInfo.attr.navbarbrand }} >
{{ aSurveyInfo.name }}
</div>
{% endif %}
Any help would be really appreciated!