Skip to content

Commit

Permalink
Update Language Selector Template
Browse files Browse the repository at this point in the history
- use icon resolver form Products.CMFPlone
  • Loading branch information
1letter committed Apr 2, 2021
1 parent 7b7926f commit aaac63a
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions plone/app/i18n/locales/browser/languageselector.pt
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<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;
here_url context/@@plone_context_state/view_url;
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 string:${here_url}?set_language=${code};
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 string:${here_url}?set_language=${code};
title name">
<tal:flag condition="showflag">
<img tal:replace="structure python:icons.tag(flag, tag_class='plone-icon-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 aaac63a

Please sign in to comment.