title: TYPO3 Language Switch with FLUID
body: <p>I've made a language menu (switch) for <code>TYPO3 7.6</code> with <code>Fluid</code> only, no <code>TypoScript</code>. Just a Dropdown, see screenshot below. I also used the <code>Ext:vhs</code>, here's my code example:</p>
  
  <pre><code>{namespace v=FluidTYPO3\Vhs\ViewHelpers}
  &lt;ul id="languageMenu" class="dropdown menu" data-dropdown-menu&gt;  
      &lt;!-- german L:0 --&gt;
      &lt;f:if condition="{v:page.language()}==0"&gt;
          &lt;li class="de"&gt;
              &lt;f:link.page pageUid="{page.uid}" additionalParams="{L:0}"&gt;
                  &lt;f:image src="EXT:myext/Resources/Public/Icons/Flags/de.svg" width="18" height="14" alt="" /&gt;
                  &lt;f:translate key="LLL:EXT:myext/Resources/Private/Language/locallang.xlf:language.de" /&gt;
              &lt;/f:link.page&gt;
              &lt;ul class="menu languageSubMenu"&gt;
                  &lt;li class="en"&gt;
                      &lt;f:link.page pageUid="{page.uid}" additionalParams="{L:1}"&gt;
                          &lt;f:image src="EXT:myext/Resources/Public/Icons/Flags/gb.svg" width="18" height="14" alt="" /&gt;
                          &lt;f:translate key="LLL:EXT:myext/Resources/Private/Language/locallang.xlf:language.en" /&gt;
                      &lt;/f:link.page&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
      &lt;/f:if&gt;
  
  
      &lt;!-- english L:1 --&gt;
      &lt;f:if condition="{v:page.language()}==1"&gt;
          &lt;li class="en"&gt;
              &lt;f:link.page pageUid="{page.uid}" additionalParams="{L:1}"&gt;
                  &lt;f:image src="EXT:hellocode/Resources/Public/Icons/Flags/gb.svg" width="18" height="14"
                           alt="{f:translate(key: 'LLL:EXT:hellocode/Resources/Private/Language/locallang.xlf:language.en')}" /&gt;
                  &lt;f:translate key="LLL:EXT:myext/Resources/Private/Language/locallang.xlf:language.en" /&gt;
              &lt;/f:link.page&gt;
              &lt;ul class="menu languageSubMenu"&gt;
                  &lt;li class="de"&gt;
                      &lt;f:link.page pageUid="{page.uid}" additionalParams="{L:0}"&gt;
                          &lt;f:image src="EXT:myext/Resources/Public/Icons/Flags/de.svg" width="18" height="14" alt="" /&gt;
                          &lt;f:translate key="LLL:EXT:myext/Resources/Private/Language/locallang.xlf:language.de" /&gt;
                      &lt;/f:link.page&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
      &lt;/f:if&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>At the moment the language switch is always shown. If there's no page translation, I'll get an 404 Error. Of course, the missing page aren't exist. How can I hide my language switch, if there's no translation?</p>
  
  <p>In past I used <code>USERDEF1</code> with <code>TypoScript</code>, but I need a solution with <code>Fluid</code>. I also see there's a viewhelper <a href="https://fluidtypo3.org/viewhelpers/vhs/master/Condition/Page/IsLanguageViewHelper.html" rel="nofollow noreferrer">v:condition.page.isLanguage</a> but this isn't working for me or I don't know how?! Is it possible to do this with <a href="https://wiki.typo3.org/Fluid" rel="nofollow noreferrer">Fluid</a> or <code>vhs</code>?</p>
  
  <p>I would be grateful for any advice. Otherwise I have to write typoscript again ...</p>
  
  <p><a href="https://i.stack.imgur.com/F4dCy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F4dCy.png" alt="frontend language switcher"></a></p>