1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-18 15:54:50 +00:00
TiddlyWiki5/core/wiki/languageswitcher.tid

33 lines
857 B
Plaintext
Raw Normal View History

title: $:/snippets/languageswitcher
\define flag-title()
$(languagePluginTitle)$/icon
\end
\whitespace trim
<$linkcatcher to="$:/language">
<div class="tc-chooser tc-language-chooser">
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[description]]">
<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>>
<$link>
<span class="tc-image-button">
<$set name="languagePluginTitle" value=<<currentTiddler>>>
<$transclude subtiddler=<<flag-title>>>
<$list filter="[all[current]field:title[$:/languages/en-GB]]">
<$transclude tiddler="$:/languages/en-GB/icon"/>
</$list>
</$transclude>
</$set>
</span>
&#32;
<$view field="description">
<$view field="name">
<$view field="title"/>
</$view>
</$view>
</$link>
</div>
</$set>
</$list>
</div>
</$linkcatcher>