-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use icon resolver form Products.CMFPlone
- Loading branch information
Showing
1 changed file
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |