Skip to content

Commit

Permalink
Update languageselector.pt Template
Browse files Browse the repository at this point in the history
use plone 6 icon resolver
  • Loading branch information
1letter committed Apr 27, 2021
1 parent cfce2bf commit 676405a
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions src/plone/app/multilingual/browser/templates/languageselector.pt
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<tal:language tal:condition="view/available">
<ul id="portal-languageselector"
tal:define="showFlags view/showFlags;
<ul
id="portal-languageselector"
tal:define="showFlags view/showFlags;
languages view/languages;
portal_url view/portal_url;">
portal_url view/portal_url;
icons python:context.restrictedTraverse('@@iconresolver');">
<tal:language repeat="lang languages">
<li tal:define="code lang/code;
<li
tal:define="code lang/code;
selected lang/selected;
codeclass string:language-${code};
current python: selected and 'currentLanguage ' or '';"
tal:attributes="class string:${current}${codeclass}">
<a href=""
tal:define="flag lang/flag|nothing;
tal:attributes="class string:${current}${codeclass}">
<a
href=""
tal:define="flag lang/flag|nothing;
name lang/native|lang/name;
showflag python:showFlags and flag;"
tal:attributes="href lang/url;
title name"
><tal:flag condition="showflag">
<img width="14"
height="11"
alt=""
tal:attributes="src string:${portal_url}${flag};
alt name;
title name;" />
</tal:flag
><tal:nonflag condition="not: showflag"
replace="name">language name</tal:nonflag
></a>
</li>
tal:attributes="href lang/url;
title name">
<tal:flag condition="showflag">
<tal:flag condition="showflag">
<img tal:replace="structure python:icons.tag(flag, tag_class='plone-icon-flag')" />
</tal:flag>
</tal:flag>
<tal:nonflag
condition="not: showflag"
replace="name">language name</tal:nonflag>
</a>
</li>
</tal:language>
</ul>
</ul>
</tal:language>

0 comments on commit 676405a

Please # to comment.