We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43965
    • 23 Posts
    Hi All,

    Using babel i wanted to display two flags. One for English and one for german. The below code is showing the images however both flags are linking to english. Any help please?

    <div id="langs">
    	<a href="[[~[[*id]]]]"><img src="assets/templates/comminform/images/flag-en.png" title="[[++language]]"></a>
    	<a href="[[~[[*id]]]]"><img src="assets/templates/comminform/images/flag-de.png" title="[[++language]]"></a> 
    </div>
      • 38723
      • 165 Posts
      You can use BabelLinks snippet to output the correct links smiley

      <ul class="cf">
        		[[BabelLinks? &tpl=`BabelLink` &cultureKey=`[[++cultureKey]]`]]
                </ul>


      And that would just add the cultureKey for the context you're currently in - providing you've set the contexts up properly.

        • 43965
        • 23 Posts
        That worked perfectly. Thanks a lot smiley

        Quote from: pdincubus at Oct 22, 2013, 04:50 AM
        You can use BabelLinks snippet to output the correct links smiley

        <ul class="cf">
          		[[BabelLinks? &tpl=`BabelLink` &cultureKey=`[[++cultureKey]]`]]
                  </ul>


        And that would just add the cultureKey for the context you're currently in - providing you've set the contexts up properly.