<!-- $Id$ -->

<div metal:define-macro="language_switch"
     class="top-actions language-switch"
     tal:define="langInfo view/languageInfo;
                 available langInfo/availableLanguages"
     tal:condition="python: len(available) > 1">
    <tal:lang repeat="lang available">
      <a href="#"
         tal:attributes="href string:switch_language?loops.language=$lang&keep=yes;
                         title lang"><img src="us.gif"
             tal:attributes="src string:${resourceBase}i18n.flags/$lang.gif;
                             title lang; alt lang;
                             class python: langInfo.language == lang
                                    and 'selected' or 'notselected'" /></a>
    </tal:lang>
</div>
