Skip to content

Commit

Permalink
Update LanguageSwitcher.tid
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Oct 29, 2024
1 parent 5042714 commit fedfb57
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions wiki/tiddlers/LanguageSwitcher.tid
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ list-after: $:/core/ui/ViewTemplate/tags
tags: ExcludeFromEmpty $:/tags/ViewTemplate
title: LanguageSwitcher

<%if [<currentTiddler>is[system]] %>
<$list filter="[[$:/language]get[text]removeprefix[$:/languages/]else[en-GB]]" variable="lang">
<$list filter="[<lang>search[zh]]">
<%if [<lang>search[zh]] %>
<$button set="$:/language" setTo="$:/languages/en-GB" style="">🇬🇧 Switch to English</$button>
</$list>
<$list filter="[<lang>!search[zh]]">
<%endif%>
<%if [<lang>!search[zh]] %>
<$button set="$:/language" setTo="$:/languages/zh-Hans" style="">🇨🇳 切换至中文</$button>
<%endif%>
</$list>
</$list>
<%endif%>

0 comments on commit fedfb57

Please sign in to comment.